Repository navigation
feat(qmd-mcp): embeddable HTTP server handle and acceptance gaps - #98
Merged
Merged
Conversation
The P5 acceptance review found the library could not be embedded
cleanly over HTTP and several upstream test cases had no evidence.
- HttpServer::bind / port() / serve(shutdown) mirror upstream's
HttpServerHandle {port, stop}; HttpOptions gains allowed_origins /
allowed_hosts that override QMD_ALLOWED_* like upstream's `??`.
serve_http stays the CLI wrapper owning SIGINT/SIGTERM.
- qmd:// decoding follows JS decodeURIComponent: malformed escapes and
invalid UTF-8 now return upstream's recorded -32603 "URI error"
instead of passing through.
- Golden fixture records 18 new upstream cases (encoded/double-encoded
and spaced paths, suffix match, malformed escapes, get suggestions,
multi_get Errors/SKIPPED, lex edge queries, HTTP tools/call get);
existing-case churn is limited to doc counts from the new corpus file.
- New in-process HTTP tests prove a call parked in inference does not
block other requests (AC5), plus allowlist override and port 0;
inflight-gate tests cover the idle fast path and release on panic or
error.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
HttpServer::bind/port()/serve(shutdown)mirror upstream'sHttpServerHandle { port, stop };HttpOptionsgainsallowed_origins/allowed_hosts(they overrideQMD_ALLOWED_*, like upstream's??, origin-guard.ts:98-99).serve_httpstays the CLI wrapper owning SIGINT/SIGTERM; CLI behavior unchanged. Embedding doctest + crate README section.qmd://decoding follows JSdecodeURIComponent: malformed escapes and invalid UTF-8 return upstream's recorded-32603 "URI error"instead of passing through.getbare name +Did you meansuggestions,multi_getErrors:/[SKIPPED, lex edge queries, HTTPtools/call get. Churn in existing cases is limited to doc counts from the one added corpus file.crates/qmd-mcp/tests/http.rs: a request parked in reranker inference does not block/health,tools/call statusor a no-rerank/query(AC5); allowlist override; port 0. Inflight-gate unit tests: idle fast path, release on panic and on error.Related issue
Closes #97
How it was tested
#[ignore]stdout test (AC6) passes with cached GGUFs.just allgreen (fmt, nightly clippy-D warnings, deny, workspace tests, rustdoc incl. the new doctest, markdownlint); no newunsafe.