Repository navigation
Project Tracker
Home · Installation · Compatibility · Tools Reference · Architecture · Providers · Configuration · Reliability · Security · Self-Hosting · Monitor · Testing · Troubleshooting · Project Tracker
Working record for MCPSearch: what is open, what was observed, and why decisions were made. Updated after each push.
Last updated: audit branch audit/2026-09-13 at e0071b7 — Phases A, B and D complete; Phase C resumed on the second machine and in progress (131 of 133 tasks done, 0 in progress, 0 blocked, 2 S3 open); Phase E not started. main is unchanged at f3dd8d9. This round closed B41, B48, B49, B50, B64, B78, B80, B81, B82, B83, B86, B108, B109, B110, B111, B112, B113, B114, B115, B117 and folded eight findings the handover re-read turned up as B109–B115; B83 also left a recorded residual as B117. The most consequential find of the round is that the suite is not reliably green on the independent host — testToolArgumentClampsAreEnforced failed about once in twenty runs, root-caused to a local-throttle boundary race and fixed as B116.
How to read this page. Open issues are things to fix, each with evidence and a proposed action. The action plan turns them into a numbered, ordered task list with acceptance criteria. Observations are measurements and findings that are not defects but would otherwise have to be rediscovered. Decisions record choices that are easy to reverse by accident. Recently resolved is the audit trail.
A 12-section audit brief is being worked on the branch audit/2026-09-13. main is untouched
until Phase E passes.
| Phase | State |
|---|---|
| A — inventory, baseline, environment | ✅ complete (AUDIT/inventory.md, AUDIT/environment.md, AUDIT/baseline/) |
| B — L0–L7 passes + placeholder sweep | ✅ complete: 121 findings, one committed record each in AUDIT/findings/
|
| C — fix → test → audit | in progress: every S0/S1/S2 closed; 131 of 133 done; 2 open (S3) |
| D — fold new findings | ✅ folded: B01–B101 in AUDIT/ledger.md / ledger.json, plus B109–B115 from the handover re-read and B117 from B83's residual |
| E — verification on an independent host | not started |
Task tracker. AUDIT/ledger.md is authoritative for the audit (the JSON twin carries every
field); this page mirrors it. 133 tasks: A01–A12 from the first enumeration, B01–B101
folded from the five audit passes (17 duplicate reports merged), B102–B107 found while fixing,
B108 found while recording CI (the actions pinned for Node 20), B109–B115 found by the
handover re-read, B116 from the intermittent suite failure found while establishing the baseline
on the independent host, and B117 from the residual B83 deliberately left, B118 from the invalid --transport error B114's worker found still contradicts the usage text it had just derived, B119 from the residual B106's evidence turned up, B120 from the residual B102 left, and B121 surfaced by B96's new status-mapper coverage. 131 DONE, 0 PROGRESS, 2 START, 0 BLOCKED; no S2 task remains open —
every task is either finished or still to do; nothing is parked.
Closed so far, each with before/after evidence in AUDIT/evidence/:
| Task | What it was | Commit |
|---|---|---|
8a1fffe (fold) |
Seven findings the handover re-read turned up, folded as B109–B115: rank fusion decides the resale discount per response but applies it per result (B109); web_answer's provider lost its enum (B110); the nullable enums exclude the null their own type admits (B111); statusInput is the only object schema without required (B112); configuration is validated before argv, so a misnamed config file pre-empts --help (B113); usage under-documents the parser (B114); the README undercounted the keyless routes (B115) |
8a1fffe |
B116 (S3) |
The suite was not reliably green on the independent host: testToolArgumentClampsAreEnforced failed about once in twenty runs. A local throttle that cleared between the orchestrator's authorize and its wait estimate returned nil — "available now" — which the combined guard read as "cannot wait", so the stale denial was returned and a search that had a usable provider was lost; the estimate also truncated where the token branch rounded up. Fixed with a deterministic creeping clock rather than by re-running |
14dfb3f |
B109 (S3) |
Rank fusion decided the resale discount per response and applied it to every result, so one resold engine discounted sibling results that came from an index nobody else owned — defeating the per-result refinement the code's own comment describes. A result with its own engine list is now judged on that alone, and the response-level flag is only the fallback when per-result engines are absent; the response-level test also gained the isIndependentIndex guard the per-result one already had |
357762d |
B112 (S3) |
web_search_status's input was the only object schema without required. The existing recursive schema lint read an absent required as the empty set, so it could not see the omission; it now flags it, and reverting the fix while leaving the strengthened lint reddens, while the pre-fix lint stays green — proving the strengthening is load-bearing |
6a6f406 |
B86 (S3) |
Provisioning wrote nine logs through fixed, predictable /tmp paths and loaded the image from one. The real exposure is the write targets (> follows a symlink, so a local user could make this cached-sudo run truncate any file that account can write); the unverified load is defence in depth. One private mktemp -d/0700 directory now holds every artefact, removed by an EXIT trap, and the tarball is explicit via SEARXNG_IMAGE_TAR with its RepoDigests checked after docker load
|
688bb1e |
B78 (S3) |
ProviderStatus.State.probing and .unavailable were never produced, so their renderer branches could not run. Deleted; the compiler and a before/after grep are the proof, since a deleted case cannot be named by a test. This interacts with open task B76, which owns the producer — recorded in B76's ledger note |
3d93267 |
B64 (S3) |
Malformed JSON from a live node fell through to the generic catch and was shown as unreachable, sending an operator after a network fault that did not exist. A dedicated catch is DecodingError now reports .degraded with the parse reason and the elapsed latency, reserving .down for transport failures |
6c68267 |
B117 (S3) |
The HTTP smoke chose a free port by closing the probe socket before the child bound, so the child could lose the bind race. The child-reporting handshake the finding offered is impossible without a production change (--port 0 is rejected), and holding the probe socket across exec was re-measured as failing Errno 48 with and without SO_REUSEADDR — so the honest fix is a bounded retry that fires only on the Could not bind marker, never retries a live-but-unhealthy child, and prints a note when it happens |
2b5d412 |
B114 (S3) |
usage was hand-written and omitted --help, the streamable-http/streamable_http aliases and the --flag=value form; the test that claimed to check it used substring matching, which is how -h passed as a substring of --http-allowed-host. usage is now rendered from the same Flag/TransportName tables parse dispatches on, and the test matches whole tokens |
fad4e85 |
B113 (S3) |
Configuration was loaded and validated, and the HTTP client and provider pipeline built, before argv was parsed — so B09's fatal config arm made --help exit 2 with no usage. Argv is now parsed first and --help handled before any configuration is read |
406302f |
B111 (S3) |
Nullable enum arguments declared ["string", "null"] but their enum excluded null, which JSON Schema reads conjunctively — so a strict client filling every required slot could not legally send the default. null is now in each enum, and the schema lint reports any property whose type admits null but whose enum does not |
74b8916 |
B110 (S3) |
web_answer's provider had lost the enum web_search's declares, though the schema called itself a mirror. Rather than copy it, both tools now reference one definition derived from ProviderID.allCases, and the lint compares mirrored tools structurally so the drift cannot recur |
a3bf795 |
B50 (S3) |
Provisioning destroyed the working instance before its replacement was proven on the production port. The canary only ever validated a spare loopback port, so a port conflict or a container that never answered JSON there left the node serving nothing. The swap is now reversible: the old container is renamed aside and stopped, the replacement is proven on the production port, and only then is the old one removed — with every fallible step rolling back | 65ae285 |
B118 (S3) |
B114 derived usage from the parser's tables, which left the invalid --transport error still saying expected: "stdio or http" as the last place in the CLI contradicting the usage text. TransportName.acceptedValues is now the single producer for both |
3417c76 |
B106 (S3) |
Already fixed, and left open. The fix is 761966b1, an ancestor of HEAD, with monitor_tty_smoke.py byte-identical to it — but the evidence artifact was never written, so the task read START and would have blocked Phase E's "only DONE or BLOCKED" gate. It was the only START task with a resolving audit(<ID>) commit. The artifact now proves the committed behaviour with a stub crash and a stub hang |
761966b1 |
B87 (S3) |
The Jina Reader fallback sends the target URL to a third party by default with no disclosure. The behaviour is an accepted, toggleable design, so the defect is the omission: disclosure now appears in the tool description, a README section, and on every successful reader result, closing a path that previously emitted no warning at all | d829e00 |
B85 (S3) |
Query hashing for logs was a fast unsalted FNV-1a documented as non-reversible. The underlying fact was the problem, so it was made resistant rather than renamed: HMAC-SHA-256 under an in-memory key, truncated to the same log field, with the cost (ids stable within a run, not across restarts) stated in code | 3f40c3f |
B66 (S3) |
Fifteen decoded-but-unread vendor DTO fields across five adapters, plus a sixteenth the finding missed. Every removed property was Optional, so the synthesized init(from:) used decodeIfPresent and no key was ever required — decoding is unchanged, shown by a build that errors on all fifteen and a suite that still passes with fixtures carrying the removed keys |
0a48020 |
B119 (S3) |
B106's fix polls the monitor once, after a fixed drain window, so a crash after that window but before the first frame was still a timeout. Session.wait_for now polls the child on every read turn, so an exit is classified whenever it is observed |
0b316e7 |
B102 (S3) |
A cross-scheme redirect was refused by the transport, surfacing as an opaque the transport reported error -1102. The file-system codes now map to a legible reason, and the refusal is deliberately a fetchFailed rather than a blockedURL — the blocked target is a file: URL we never see, so naming the entry URL would claim a decision never made. Stated limit: URLSession never surfaces a scheme-changing hop, so this cannot come from URLPolicy itself |
03591e0 |
B92 (S3) |
web_open reported the requested URL as final_url on the Jina path. The finding's premise turned out to be wrong: upstream fills the reader's url field with the requested target, not the post-redirect URL, so the literal fix cannot add redirect transparency. The field is now validated and used, the unused code/status dropped, and the limit documented in code and evidence |
6c142bc |
B84 (S3) |
IPAddress.v6 is a public case accepting any byte count while its accessors index 16 bytes unconditionally, so a malformed value traps the process. The public API was deliberately kept and every indexing accessor now guards the length, with the honest cost stated: the invariant stays representable, so the guards — not the type — are the defence |
e8fbfaf |
B54 (S3) |
Concurrent first use of the Parallel provider ran the MCP handshake more than once. It is now one actor-held Task that later callers await, and a failure clears it so retry behaviour is unchanged. The test forces the interleaving with a gated transport that parks the first initialize on a checked continuation, so the race is deterministic rather than hoped for |
b7c20a5 |
B120 (S3) |
Premise disproven. Folded from B102's claim that ftp:/data: redirects still surface as an opaque transport reason. A loopback redirect probe showed URLSession consults the redirect delegate for every scheme except file:, so those hops already reach the policy and are already refused as blockedURL(target). No behaviour changed; the commit is a characterization test plus corrected documentation |
6bdb467 |
B91 (S3) |
Log emission wrote fd 2 synchronously from whatever task logged. The literal O_NONBLOCK-and-drop option was measured and rejected — the flag is on the open file description, so it would make the Swift runtime's crash output and the MCP transport's stderr lossy too, and PIPE_BUF is 512 bytes here, which breaks one-line framing. A bounded queue with a single writer thread and an atexit flush replaces it, so submit never blocks and overflow is counted and reported once |
3f26397 |
B90 (S3) |
Premise partly wrong. The finding prescribed ChannelOptions.maxConnections, which does not exist in swift-nio 2.102.0, and IdleStateHandler is unavailable because NIOExtras is not a dependency. Both bounds were built in HTTPMCPHost instead: a 64 live-channel cap and a request-completion deadline armed before header parsing and cancelled at .end, so a streaming SSE response is never mistaken for an idle connection |
819c414 |
B89 (S3) |
SearchCache.pruneExpired rebuilt the whole dictionary on every read, write and stats call. Entries now carry an absolute expiresAt and the cache tracks the earliest deadline, so get judges only its own key and the in-place sweep runs only when due — with the observable semantics (hit/miss counts, live-only stats().entries, capacity, successful-only rule) deliberately unchanged |
ed458fb |
B88 (S3) |
A per-host DNS cache was declared in a comment and did not exist, and every redirect hop resolved twice. A real per-fetch memo now stores address lists, never decisions: each validation still re-classifies every address, an unseen host is still resolved before judgement, only successful lookups are stored, and the memo dies with the fetch — so the accepted DNS-rebinding bound is untouched and only the duplicate resolution is removed | dd7ce61 |
B79 (S3) |
A request-head Content-Length sized the body buffer, so a peer declaring 1 MiB without sending a body allocated it on the head — 64 MiB at B90's connection bound. A HTTPRequestBodyPolicy with a fixed 4 KiB initial capacity now ignores the header, and the buffer grows lazily. Stated honestly in the artifact: the allocation is real but not resident (64 head-only declarations grew RSS ~1.9 MiB), so the test pins the decision, not the allocator |
c6e138f |
B76 (S3) |
mcps-mon ignored SEARCH_DISABLED_PROVIDERS, labelled disabled providers "ready" and probed them. ProviderStatus.State.unavailable was reintroduced with its producer — which B78 explicitly sanctioned, since B76 owns that producer — plus an enablement guard in the probe and an OFF row |
6e4eb0f |
B58 (S3) |
web_search and web_answer duplicated their argument parsing. The premise was half stale: the duplication was real, but the schema drift it also described had already been fixed by B110. One DiscoveryArguments + parseDiscoveryArguments now serves both handlers, and the defaults test covers both tools |
1ef87aa |
B57 (S3) |
The per-provider "which variable enables me" contract was reported as triplicated. It was in five places, and it was already wrong for parallel, which needs a flag and an endpoint — so with the flag set and the URL emptied, both hints advised the flag the operator had already set. A new ProviderEnablement is now the single authority every surface reads |
c5280f9 |
B46 (S3) |
mcps-mon always exited 0, so --iterations could not be a health check. It now exits 1 when every probed node failed or every configured provider failed, and 0 when something answered; --exit-zero is the opt-out for graphical runs. This is a deliberate behaviour change and is documented in a new EXIT STATUS section of the usage text |
90078bc |
B96 (S3) |
HTTPStatusMapper.map's HTTPError branches and validate's default/422 statuses had no coverage. A new HTTPStatusMapperTests.swift owns the contract. It also surfaced a latent hazard: HTTPError.invalidURL's detail is interpolated verbatim into the caller-facing message, so a URL-shaped detail would be echoed with any key in it — dormant, because no production site throws it, and folded as B121 rather than asserted away |
fea597a |
B95 (S3) |
The monitor's setup-hint test asserted a string its own fixture had constructed. The fixture now builds the real ProviderProbe, and the test asserts the authority's own BRAVE_SEARCH_API_KEY, its difference from Tavily's, and Tavily's absence |
73ec306 |
B94 (S3) |
testStatusCountsSuccessesAndFailures never observed a failure — it ran fast and asserted a provider that was never selected. It now runs a balanced search that really selects the failing provider and asserts the full failure projection |
87f1ae9 |
B93 (S3) |
The MarkupDepth regression suite left four branches unpinned. Five tests now cover them, including web_open on a 20 000-deep page through a real stdio session. Honest limit: the withContiguousStorageIfAvailable fallback is unreachable from a test on this platform, so that assertion pins the slice semantics the branch depends on rather than executing it |
1aaaeb9 |
B71 (S3) |
Three copies of the same subprocess harness had already diverged — the SchemaCompatibilityTests copy dropped the stderr payload and never read its pipe. One ServerProcess is now the only harness, with the other two keeping local names via typealias. Equivalence was shown, not asserted: the same three classes were run in both trees and their sorted test manifests are byte-identical |
2a76c43 |
B70 (S3) |
The subprocess harnesses advertised a timeout that a blocking availableData read could not enforce, so a hang looked handled. The shared harness now waits in poll(2) with the remaining budget. Proving it required a test whose RED is a hang, killed after 30 s — which is the honest shape for this defect |
0409a25 |
B101 (S3) |
HTTPMCPHost's startup-failure path was untested; the origin arm was already unit-tested, and the internal-error arm proved unreachable from the HTTP surface (measured: every malformed initialize answers 4xx). A new HTTPMCPHostLifecycleTests.swift covers the bind failure; the unreachable arm is recorded, not faked |
6fb1a7d |
B100 (S3) |
ToolOutputFormatter's fallback and diagnostic branches were untested. The named "No results." branch cannot be reached — the orchestrator throws before building a response and the cache refuses resultless ones — so the test pins the reachable tool-error behaviour instead. New ToolOutputFormatterTests.swift over stdio, because the tool layer is an executable target |
7c15dcc |
B99 (S3) |
Nothing tied the Swift test harnesses to the Python ones. New scripts/harness_tests.py (16 stdlib tests) asserts the scrub lists agree in both directions, covers seven searxng_health.py classifications against a loopback stub and seven soak.py cases, and is wired into the static-analysis job. The record's third clause (two executables vs one stub) is recorded as still open |
6e09ca8 |
B98 (S3) |
The Monitor actor had no test. The record's premise was wrong — there was no injectable client, the actor built its own — so one production change was needed: a test-only internal init(options:configuration:http:log:) with init(options:) delegating identically. Nine tests cover refresh, counting and warning logic |
0c124b9 |
B97 (S3) |
AnswerSynthesizer's completion edges, token usage and locale prompt were untested. Eight tests now cover an empty choices array, the token fields, the locale line and the timeout description |
abc29e8 |
B41 (S3) |
The binary links two Apache-2.0 packages that ship a NOTICE.txt and no attribution file existed under any name. Reading the checkouts narrowed it: three more packages carry the Swift Runtime Library Exception, which waives the §4(a)/(b)/(d) attribution for embedded code, and swift-sdk is mid-transition MIT→Apache-2.0. THIRD-PARTY-NOTICES.md now carries the inventory and both notices, with a lockfile-drift gate |
50d3305 |
B115 (S3) |
The README claimed four keyless routes without stating the rule, and the four excluded Open Web Search for needing a supplied endpoint while including SearXNG, which needs one for the same reason. Two Needs cells were also wrong |
fa0f5b8 |
B80 (S3) |
soak.py's Server.read() returned None for both EOF and a malformed stdout line, so a corrupted protocol stream was reported as a clean end of stream and the offending line discarded |
ed21eda |
B81 (S3) |
mcp_smoke.py de-chunked an SSE body after decoding it to str, so a chunk's byte count was applied to character offsets and any multi-byte character shifted every later boundary |
a6c3340 |
B108 (S3) |
Three uses: pins declared the deprecated Node 20 runtime. Each candidate's runs.using was read from its own action.yml, and the current stable of each is pinned rather than the oldest node24 release |
ba0aef1 |
B49 (S3) |
The generated SearXNG settings.yml inherited the umask, so the per-node secret was 0644 while the key file beside it was 0600. The first fix rested on a umask assumption that measurement disproved — BSD sed -i preserves the mode — so the mode is now set and asserted |
45a92b5 |
B82 (S3) |
--queries was a plain int and QUERIES[: args.queries] gave negative-slice semantics: --queries -3 ran 48 of 51 while the header presented 48 as the request |
e246def |
B83 (S3) |
The HTTP smoke could wait the full 20 s on a server that had already exited and never polled it or read its stderr. The residual port race it deliberately left is recorded as B117
|
914e44d |
| A01 (S0) | A deeply nested page killed the server process, reachable from one web_open call |
199a962 |
| B01 (S0) |
deploy/docker-compose.yml documented a SEARXNG_SECRET_KEY variable SearXNG never reads, so a tracked placeholder signed sessions |
2f66ff1 |
| B02 (S0) | The redirect loop — the whole SSRF boundary for redirects — had no test at all | cee651e |
| B06 (S1) | Untrusted seconds were converted Double → Int without a range check: Retry-After: 1e30 or mcps-mon --interval inf trapped the process |
fe7a4f3 |
| B07 (S1) | Response bodies were fully buffered before the byte cap was applied, so one hostile or endless page could exhaust memory | ce6e19c |
| B04 (S1) | Caller cancellation was swallowed mid-flight, and a cancelled web_open started a second outbound fetch through Jina Reader |
6838385 |
| B08 (S1) |
web_open's success path through the MCP tool was never executed by a test |
f47ce1e |
| A06 (S2) | The five secret-scan findings were one synthetic test literal; the working tree is clean and history is waived in writing | bc86e08 |
| A02 (S2) | No formatter configuration, so the tool's 2-space default was the only style on record: 19 155 diagnostics | 68a7104 |
| A03 (S2) | No lint configuration: 504 SwiftLint findings, 27 of them in SwiftPM-generated code, hiding 17 real ones | b9dfbbd |
| A11 (S2) | Python had no repository-owned tooling config: ruff rules and pyright are now explicit, and pyright runs at strict with 0 errors |
3ac18fe, b313531
|
| A09 (S3) | The insecure-WebSocket finding was a rejection fixture; waived in writing on that one line | bc00d8e |
| A08 (S3) |
urlopen on runtime-built URLs in both Python harnesses; both now assert the destination first |
1e62c21 |
| A07 (S3) | Homebrew was installed by piping a remote script into a shell; now downloaded and checked against a pinned digest | f83b50e |
| A10 (S1) | CI had no gates: now warnings-as-errors, a coverage floor, formatter, linter, type checker and every scanner, with a dispatched run green on the branch | 3dee92f |
| B38 (S3) | The CI job token kept the repository default scope; it is now contents: read
|
0bf6a89 |
| B36 (S3) |
.gitignore missed the profile/coverage/byte-code output the documented runs produce |
26c0d71 |
| B03 (S1) | The HTTP transport served exactly one MCP session per process, and it could never be released | 89f923a |
| A04 (S1) | The executables' coverage was unmeasurable: the MCP server reported 0 % while being thoroughly exercised | 1131f73 |
| B12 (S2) | A provider that already failed was charged a second, synthetic deadline failure | 6d965a3 |
| B15 (S2) | The Jina Reader target was percent-encoded into the path, so URLs with a query fetched the wrong resource | 25e8739 |
| B13 (S2) | The session resource timeout silently capped every per-request override, including the 45 s synthesis budget | 6b7e161 |
| B14 (S2) |
web_open had no total deadline, so a slow-drip server could hold a tool call open indefinitely |
a1ed6f5 |
| B16 (S2) | PDFs were on the content-type allow-list and returned as Latin-1 mojibake labelled raw_text
|
33f755d |
| B17 (S2) | The secret-key substitution in provisioning was unchecked: a failed sed left a publicly known placeholder signing a live instance |
4807c93 |
| B26 (S2) | Only [n] markers were validated, so the answer prose could carry fabricated URLs |
fcaedef |
| B27 (S2) | Retrieved text and provider answers entered the prompt and the output undelimited (indirect prompt injection) | 55cd6d7 |
| B09 (S2) | Nothing validated configuration at startup: a typo or a missing config file was silently discarded | 7fe161f |
| B11 (S2) | A half-open circuit breaker authorised every concurrent caller, because authorize discarded the breaker's refusal outside its .open branch |
e4468c2 |
| B25 (S2) | Engine names, unresponsive_engines reasons and error text from a probed instance reached the operator's terminal unfiltered, so an OSC 52 payload or ESC[2J in an engine name was executed by the tty |
22dfdab |
| B21 (S2) | The HTTP Host allow-list was hard-coded to 127.0.0.1/localhost/[::1], so the documented --host + TLS-proxy deployment was answered with 421 Misdirected Request
|
1da6cee, 434a441
|
| B18 (S2) | The web_open rejection test accepted any message containing "Refused" for every row, so its expectation column was unenforceable |
0b9a17d |
| B19 (S2) | The budget test never read the request it was given, so handing providers maxResults instead of the surplus budget kept it green |
7ce4ebf |
| B22 (S2) | The CI Swift-version gate skipped its own error branch and exited 0 when swift -version could not be parsed |
1b8baf0 |
| B24 (S2) | The cancellation test accepted "CancellationError or any HTTPError", which is every failure the client can produce |
659d4bf |
| B29 (S2) |
maxRetryAfter — the cap that stops a hostile Retry-After stalling a search for an hour — had no test |
f930809 |
| B10 (S2) | Ctrl-C arrived as a signal instead of the byte the dashboard's quit branch handled, and nothing restored the terminal |
952a86d, aaab746
|
| B107 (S2) | An external SIGINT/SIGTERM killed the process with the shell still in raw mode (found while fixing B10) |
aaab746 |
| B28 (S2) | Nested content containers made preferredContentRoot re-walk every subtree: 7.19 s for a 1.8 MB crafted page |
a3fff01 |
| A05 (S2) |
swift-nio was the last direct dependency pinned by range rather than exactly |
09c5122 |
| B32 (S2) | Tool-argument guards and clamps were untested beyond three malformed shapes | 6afd1bb |
| B35 (S2) | Orchestrator tests slept for a detached task that no longer exists and bounded the call by the CI scheduler | a9430ff |
| A12 (S2) | Nothing linked AppConfiguration.Key to the strings in example.env, the scripts, deploy/ and CI |
b886277 |
| B30 (S2) |
DirectHTTPFetcher's content-type gate, raw-text path, byte cap and timeout mapping had no test |
699373d |
| B23 (S2) |
soak.py --providers was not authoritative: an ambient SEARCH_DISABLED_PROVIDERS kept a requested provider disabled |
ddc3708 |
| B31 (S2) |
AppConfiguration.load and its file-vs-environment precedence had no test |
7382892 |
| B34 (S2) |
ResultNormalizer's URL repair and text cleaning were untested; testing found a mailto: link repaired into a credential URL |
40379b8 |
| B33 (S2) |
WebFetcher's reader-failure arm was untested in both shapes (native fallback with a warning, and the direct error surfacing) |
79eea24 |
| B20 (S2) | The HTTP-transport harness closed its probe socket before the child bound, and its comment claimed collision-freedom | ad00aec |
| B55 (S3) | The uncalled ProviderHealth.setNote was dead public API |
cf50be4 |
| B53 (S3) |
Terminal.truncate counted escape bytes as columns, cutting styled text short and slicing sequences |
fab9797 |
| B42 (S3) | The hand-rolled Origin check accepted any host starting with 127., a registrable name |
258dcc7 |
| B52 (S3) | A cancelled request leaked the half-open probe it had claimed, stranding the breaker for good | dc281ed |
| B51 (S3) |
Log.escape kept a diagnostic on one line but let ESC/C1/Cf bytes reach the terminal |
8c4ea47 |
| B45 (S3) | The smoke harnesses' "prove the scrub" loops popped keys that were never there | 50795f7 |
| B47 (S3) |
example.env told the operator to fix a SearXNG setting the shipped file already sets |
cf7bb75 |
| B44 (S3) | The soak's "provider never contributed" failure existed only in a comment | 790bb52 |
| B43 (S3) | The baseline table cited the raw gitleaks report, which is deliberately not committed | fe99ce1 |
| B40 (S3) | Nothing detected that Package.resolved had drifted from the manifests |
2e1e01f |
| B37 (S3) | Committed baseline evidence embedded the auditor's absolute home path and 2.5 MB of raw dumps | 168be07 |
| B39 (S3) | CI did not pin the Swift toolchain and did not record which one ran | b62731c |
| B63 (S3) | Entity decoding replaced sequentially over its own output, so &lt; decoded to a live <
|
2ffb23e |
| B77 (S3) |
ToolArguments.bool(_:) had no caller |
dce7118 |
| B74 (S3) |
--no-nodes was silently ignored when a --node was also present |
d78d414 |
| B59 (S3) |
PARALLEL_MCP_URL= could not clear the built-in endpoint; the branch was unreachable |
ca465f0 |
| B61 (S3) | Hyphenated boilerplate markers (side-bar, site-header, …) could never match |
4112d77 |
| B62 (S3) |
isReserved refused 192.0.0.0/16 while documenting /24
|
e2fb687 |
| B60 (S3) | The DuckDuckGo kl hint sent the region twice (us-us) instead of region-language
|
3bcfb93 |
| B68 (S3) | Duplicate of B35 (the 60 ms sleep and detached-task comment), verified already fixed | c5ef374 |
| B69 (S3) | The clock test asserted a non-negativity that no implementation can violate | 7505451 |
| B67 (S3) | The node table's header did not line up with its data (state width and a repeated indent) | 21bb162 |
| B72 (S3) |
assertNoCredentialLeak documented a check it did not perform and passed vacuously |
e36d510 |
| B56 (S3) |
BlockKind.noResults had no producer, consumer or test |
6a30998 |
| B75 (S3) | A flag could be swallowed as a value (--node --interval=5), and --node accepted a relative URL |
b14312d |
| B73 (S3) | The soak report printed every failure category beside every provider | f7c5501 |
| B65 (S3) |
NodeStatus.State.skipped was unreachable dead state |
0abd9a0 |
| B05 | The temporary audit diagnostics file, deleted as part of A01 | 199a962 |
Numbers right now. Suite 477 tests, 6 skipped, 0 failures (baseline 371 — the added tests are A01's regressions plus the new redirect and conversion tests); debug and release builds warning-free; AddressSanitizer clean,
where it aborted the process before A01's fix; ThreadSanitizer clean; swift-format lint --recursive --strict
is at 0 after A02, and the full-history secret scan is clean or waived in writing (A06); SwiftLint --strict and ruff are at zero too, pyright runs at strict with 0 errors, and semgrep reports 0 findings with no exclusion anywhere. Coverage, linters and
scanner output live in AUDIT/plan.md and AUDIT/baseline/.
Coverage, and the executables. The percentages below are from the A10 baseline run; the CI coverage floor (80 %) is re-checked on every branch run, including the ones that added the tests above. The suite reports coverage for the library and both executables: WebSearchCore
91.3 %, SwiftWebSearchMCP 86.1 % (it was 0 % — the MCP surface is driven as a subprocess, and its profile never
reached the report), MCPSMonitor 30.1 %, Sources/ overall 87.1 % against the CI floor of 80 %.
A01, the one S0 fixed so far. A page nested a few thousand elements deep killed the server
process — reachable from one web_open call against a hostile URL — because SwiftSoup parses
recursively on a Swift concurrency cooperative task. Fixed with a 512-level nesting bound
(MarkupDepth), a rejection of bodies that are not markup at all on the scraper path, and by
parsing on a dedicated 8 MiB-stack thread (LargeStackParse). Measured before: SIGBUS at 5 000
levels on the scraper path and 20 000 through web_open; after: ASan and the full suite green.
Full record: AUDIT/ledger.md, section A01.
| Area | State |
|---|---|
| MCP server (stdio) | Working; 371 hermetic tests plus live verification against Tavily and DeepSeek |
| HTTP transport | Working; loopback by default, no auth and no TLS by design (ISSUE-7). One session per client since the audit: each initialize gets its own server and transport, and DELETE releases it (B03) |
| Client compatibility | Schemas satisfy the documented strict-mode rules for OpenAI, Anthropic and Open Responses, and are linted; verified by rules, local protocol tests and a real socket — no vendor round trip, by decision |
| Self-hosted search | 5 SearXNG instances (this Mac + node1–4), all healthy; image pinned by digest |
| Answer synthesis |
web_answer working; opt-in, grounded in fetched results only |
| Monitor |
mcps-mon working; B104's "debug crash" was a stale incremental build, not a defect. Ctrl-C quits cleanly and an external SIGINT/SIGTERM now restores the terminal too (B10, B107), asserted on a real pseudo-terminal in CI |
| SSRF boundary | Embedded-IPv4 literals are unwrapped and classified; the DNS-rebinding window is accepted and documented |
| CI |
Green on main (run 34732076012) and green on the audit branch (run 34735662690, both jobs, all new gates). The branch run had to be dispatched by hand: the workflow listens on main pushes, PRs to main and workflow_dispatch. Runner capacity still queues runs before they start (ISSUE-13) |
Ordered by how likely each is to bite. ID is stable for reference in commits. Resolved
IDs (1–5, 8, 11, 12, 14–17) are no longer listed; the action plan below
retains them so a task and its commit message stay traceable.
Severity: high if exposed · Area: security
Decided, and kept open as an accepted limitation: there is no built-in
authentication and no TLS. Loopback (127.0.0.1) is the default bind, a non-loopback
bind logs a warning and is unauthenticated by design, not by oversight, and the only
supported exposed deployment is behind a TLS-terminating reverse proxy, which can also do
authentication. Bearer-token auth in the server is deliberately out of scope. Both vendors
require an https:// connector URL, so a proxy is needed for them in any case.
Action: none until the deployment shape changes; the reverse-proxy requirement is the supported answer.
Severity: informational (architectural, not fixable locally) · Area: self-hosting
Measured per node, with each account matching its hostname (node1@node1, …):
| Machine | Public egress v4 | Public egress v6 | Exit node |
|---|---|---|---|
| this Mac | 91.99.176.243 | 2a01:4f8:c17:ecab::1 |
deltasona (Germany) |
| node1 | 182.253.9.73 | 2404:8000:1060:3a62:396e:cf18:6055:8576 | none |
| node2 | 182.253.9.73 | 2404:8000:1060:3a62:5c1d:ccbb:f747:bad7 | none |
| node3 | 182.253.9.73 | 2404:8000:1060:3a62:1d40:4136:97c9:2dcd | none |
| node4 | 182.253.9.73 | 2404:8000:1060:3a62:50d6:2095:2b0b:2f36 | none |
The Tailscale overlay addresses (100.x, fd7a:…) are a separate thing again and are how
the instances are reached, not what an engine sees.
The nodes hold distinct public IPv6, and IPv6 egress works — but it is useless as an
independence lever, because DuckDuckGo publishes no AAAA record (html.duckduckgo.com
is a CNAME to duckduckgo.com, A 40.114.177.156 only). Every node therefore reaches it
over IPv4 from the same 182.253.9.73.
The earlier write-up called this IP reputation. That was wrong, and the correction matters because it changes what is fixable. Pinning the real address bypasses the problem entirely, from the node, without leaving the LAN:
dig html.duckduckgo.com -> rpz.biznet. / 202.169.44.80 (serves nothing)
dig @8.8.8.8 html.duckduckgo.com -> 202.169.44.80 (hijacked too)
dig @1.1.1.1 html.duckduckgo.com -> 202.169.44.80 (hijacked too)
curl --resolve html.duckduckgo.com:443:40.114.177.156 ... -> HTTP 200, "swift at DuckDuckGo"
So the Indonesian ISP blocks DuckDuckGo by poisoning the name for every resolver, not
by refusing the address. www.bing.com and search.brave.com resolve normally and both
answer HTTP 200 from the node.
The second, independent fault is SearXNG's own engine: even from the Mac's clean German
egress, where a plain GET returns results, SearXNG logs
SearxEngineCaptchaException: CAPTCHA (wt-wt) and curl_cffi ... SSLError, because its
DuckDuckGo engine uses scripted form POSTs. That is request shape, not IP.
Action: no action needed for correctness — the Mac's egress serves DuckDuckGo
10/10 through our own adapter, which does not share SearXNG's fault. If a node ever
needs DuckDuckGo, pin the verified address in the container with an extra_hosts entry
(node-local, no /etc/resolv.conf change), and accept that the pinned address needs
maintenance. Giving the nodes genuinely independent public IPv4 remains impossible while
they stay on this LAN; distinct IPv6 does not help because the engines do not publish AAAA.
Note:
deploy/provision-node.shand the monitor use the Tailscale addresses as reachability, not as egress. The distinction above does not change that.
Severity: low · Area: deployment
node5@100.99.92.66 rejects authentication with
Permission denied (publickey,password,keyboard-interactive).
This was assumed to be explained by the shared-login mistake on node1–4, where the account
matches the hostname (node1@node1, …). That hypothesis is now disproved: node5,
andreborchert and admin, each with the node1–4 password, are all rejected. node5 is
therefore a genuinely different machine state, not a naming mistake.
Action: needs a fact only an operator has — the correct account, or a password reset, or the public key installed. Until then node5 stays out of the cluster; the other four and the Mac do not depend on it.
Severity: low · Area: process
Runs have queued for 15+ minutes and been superseded by the cancel-in-progress
concurrency group. This is capacity, not code: every run that obtained a runner passed
until 41d5693. It is recorded because "the check did not run" must not be mistaken for
"the check failed".
Action: none; note it when reporting CI status. The one failure at 41d5693 was
ISSUE-14 (a stale smoke-test assertion), not capacity, and it is now fixed. The current
run is again queued rather than failed.
Numbered so a task can be named in a commit message. Ordered by risk: restore the build
first, then the security hole, then what callers actually see, then quality, tests,
documentation, and finally decisions only an operator can make. Each task ships on main
— no branches — and follows the same loop: code, test, audit, document, update this
page. A task is finished only when its "done when" condition is met and CI is green.
Dependencies, merges and deliberate exclusions are recorded in the audit note.
-
Make a local build possible at all — do this before anything else.
.buildis inside Dropbox and Dropbox has evicted its state:build.dbanddebug.yamlarecompressed,datalessand cannot be read (a 5s read times out; a 60scatofbuild.dbnever returned), soswift build --build-testssits at 0% CPU with no compiler children, blocked in llbuild'smmap()of the build file. Measured 2026-09-13: 15 dataless files under.buildwhileSources/andPackage.swiftread normally. Every remaining task needs this loop. Done when:swift build --build-testsand the hermeticswift testcomplete on this machine, with the build directory either outside Dropbox (--scratch-path) or held offline. Done: the verified loop is--scratch-path ~/Library/Caches/MCPSearch/scratch, and.buildis now markedcom.dropbox.ignoredwith zero dataless files under it. A plain in-tree build still stalls inswift-frontend/fileproviderdhere, so the scratch path is the documented local workaround. See Testing. -
Fix the stale smoke-test tool list.
scripts/mcp_smoke.pymust require the four documented tools. Done when: both smoke modes pass locally against a fresh release build and CI is green at the new HEAD, including the previously unreachable steps. Done (de63b81): both modes pass locally, and run34726601585confirms them green in CI, including the HTTP phase that had never run sinceweb_answerlanded. -
Stop duplicating the tool list. Keep the authoritative assertion in
StdioServerTests/SchemaCompatibilityTests; have the Python script require the four documented tools and their schemas rather than owning an exhaustive set. Done when: adding a throwaway tool to the server breaks exactly one layer, not two. Done (de63b81):REQUIRED_TOOLSis a presence check and extra tools are printed, not failed. -
Refresh the local build artifacts. The local executables predate
web_answer, so a local smoke run can falsely pass. Done when: local binaries postdate the sources andmcp_smoke.pyandsoak.py --queries 1both run against them. Done (de63b81): both smoke modes were run against a fresh scratch-path release build.
-
Fix the embedded-IPv4 SSRF bypass (ISSUE-15): normalise v4-mapped, NAT64, 6to4 and
Teredo forms before classification. Done when:
http://[::ffff:127.0.0.1]/is denied by a test, and no embedded form reachesallow. Done (eb4c52a). -
Decide the DNS-rebinding TOCTOU: either pin the validated address for the connection
or record it as an accepted limitation with measured evidence in Security and here.
Done when: the behaviour is deliberate and documented, not incidental.
Done: recorded as an accepted limitation —
URLSessioncannot bind the validated address without breaking TLS hostname validation, the window is one DNS TTL, and every redirect hop is re-validated. See Security and Known limitations. -
Extend
URLPolicyTestswith the embedded-IPv4 negative matrix and theSEARCH_ALLOW_PRIVATE_NETWORKboundary. Done when: the matrix covers every form the fix normalises. Done (eb4c52a). -
Fix
web_openerror attribution (ISSUE-17.1): reportfetchFailed, never a Tavily network failure. Done when: a test asserts a non-2xx page fetch names no provider. Done (73a5ac0):FetchBehaviorTestscovers it against a real socket. -
Separate local skips from upstream errors (ISSUE-17.2). Done when: all-providers-429
yields
providersFailedwith the real categories, and all-locally-skipped still yieldstemporarilyUnavailable. Done (d41becd): the decision now counts authorised requests rather than inferring from failure categories, and providers still in flight at the deadline count as attempted. -
Stop
mcps-monprobing without--probe(ISSUE-16). Done when: a non-probe refresh performs zero provider searches, asserted by a test, and the docs match. Done (3187ea0): the unconditionalcycle % 6term is gone; providers are probed once on the first frame and thereafter only on--probe/p, asserted by a test. Free mode is free after the first frame, which costs one credit per configured keyed provider. -
Curate provider failure messages (ISSUE-12): replace
urlError.localizedDescriptionso a key in a query string can never reachweb_search_status. Done when: a Mojeek-shaped failure carries no URL. Done (0edc66b).
-
Make health registration deterministic: no fire-and-forget
Taskforhealth.register, so an early request cannot bypass breaker and limiter. Done when: a test proves the limiter applies to the first request after construction. Done (2c9be10): registrations are applied inProviderHealth's initializer before the pipeline is returned. -
Serialise breaker transitions so concurrent searches cannot apply a failure before
an earlier success. Done when: ordering is asserted under concurrent load.
Done (
2c9be10): breaker updates are awaited so their order matches the searches. -
Stop the mode deadline from opening breakers: deadline cancellation is not a
provider failure. Done when: three budget-expired searches leave every breaker closed.
Done (
2c9be10): the deadline is still counted and shown byweb_search_statusbut no longer reaches the breaker; a genuinely slow provider still fails its own request timeout, which does count. -
SEARCH_CONNECT_TIMEOUT_MS: make it real or remove it from the code,example.envand the wiki. Done when: the variable either has an observable effect or no longer exists. Done (4ef1888): removed. The transport has no connect-only deadline, soSEARCH_REQUEST_TIMEOUT_MSis what bounds a stalled connection. -
Transport flags must not silently switch transports.
--port/--host/--http-pathcurrently force HTTP order-dependently. Done when: conflicting flags fail loudly or the override is documented and tested. Done (4ef1888): HTTP settings are collected and applied after parsing, so argument order cannot decide the transport, and combining one with an explicit--transport stdiois rejected as a conflict. -
Rate limiting that does not turn into a hard error (ISSUE-1): back off inside the
search budget, or return a clear "throttled, retry in Ns". Done when: the measured
single-provider failure mode is gone. Done (
569e6d3): one last-resort pass waits out an affordable throttle (max 6 s and half the remaining budget) when the alternative is an empty result; the first pass still denies rather than waits. -
Refill a wasted fan-out slot (ISSUE-2) when a selected provider is skipped.
Done when: a balanced soak shows the free provider participating.
Done (
f393947): refills come from the same preference order; an upstream failure is never replaced. -
Per-result upstream-engine attribution (ISSUE-3) so the aggregator discount is exact.
Done when:
SearchResultcarries the engines and clustering folds same-family votes. Done (e1359c0,b3b66fc):SearchResult.upstreamEnginesis populated by the SearXNG adapter, and a resold page is attributed to the index it came from so it does not look independently corroborated across two families. -
Stop
web_openduplicating the page title (ISSUE-4). Done when: a titled page renders its title once. Done (f393947): the synthesised heading is omitted when the body already opens with the title, asserted onFetchResult.
-
Decide
JinaSearchProvider: make it selectable or delete it with its key plumbing and hints. It is currently unreachable. Done when: no registered adapter is unselectable. Done (e60203e): the adapter and theProviderID.jinacase are deleted. Jina is extraction-only, and its reader failures are fetch-scoped. -
Honour or delete
ProviderCapabilities— pagination is advertised by three adapters and sent by none. Done when: no advertised capability is a fiction. Done (e60203e): deleted rather than left as a promise the code does not keep. -
Exa content: request
contents.textor drop the deadcontent: item.textmapping. Done (e60203e): the dead mapping and its snippet fallback are gone; requesting full text stays a deliberate, priced decision. -
Remove the remaining unreachable surface and no-ops:
RankFusion.ClusterDiagnostics,HTMLDocument.canonicalURL,allProvidersFailed,notFoundIsEmpty,fusionWeight(_:),ProviderHealth.reset,SearchCache.clear,Log.withLevel,isConfiguration,Data.truncatedPreview, and the emptyifinSearchOrchestrator.swift:87. Done when: the library has no dead public surface, or it is documented as API. Partly done (a375ddd): each listed symbol was re-verified to have no caller and removed.RankFusion.ClusterDiagnosticsandSearchError.allProvidersFailedremain as documented API rather than defects. -
Port convention: document or remove the SearXNG-8080 versus MCP-HTTP-8080 collision.
Done (
e60203e): the compose file records why SearXNG is published on 8888 while the MCP HTTP transport defaults to 8080. -
Move the hardcoded Tailscale node addresses out of production source into a
documented default, and cover them with an assertion stronger than
contains(":8888"). Partly done (e60203e): the monitor's default node list is now asserted exactly, but the addresses still live inSources/MCPSMonitor/main.swift.
-
Adapter contract tests (ISSUE-5): Startpage happy path, Open Web Search, Parallel MCP, Jina Reader, and call the shared
assertFailureTaxonomyfor every adapter instead of Tavily alone. Done when: dropping a 401 case from any adapter fails a test. Done (c02c969): every adapter now runs the shared taxonomy. The only remaining gap is live coverage — Tavily is the only key — recorded under Known limitations. -
Cover the untested surfaces:
HTTPMCPHost/HTTP transport in Swift, a successfulweb_open, the direct-to-Jina fallback,ProviderRegistry,ProviderHealth,NodeProbe,ProviderProbe,SearchPipelineFactory. Done (c02c969):HTTPTransportTestsdrives the built executable over an ephemeral loopback port,FetchFallbackTestscovers the reader chain, andProbeTestscovers both probes plus registry/factory wiring. -
Make the 28 silent skips loud: fail in CI when the executable is missing instead of skipping, and single-source the three environment scrub lists. Done (
c02c969): the scrub list lives inTestSupportand is mirrored byscripts/mcp_smoke.py; the three harnesses now fail rather than skip when the binary is absent. -
Remove or use the dead test helpers (
assertNoCredentialLeak,ImmediateClock). Done (c02c969):ImmediateClockis gone andassertNoCredentialLeakis used by the Mojeek contract tests. -
soak.py: make--providersactually restrict the run, and broaden the credential-leak scan beyond two hardcoded substrings. Done (c02c969):--providersis enforced through the environment, and the scan checks every secretload_secret_values()finds. -
Small test repairs: the malformed declaration at
StdioServerTests.swift:659, and an assertion on the negotiated protocol revision rather than none. Done (c02c969):StdioServerTestsasserts the negotiated revision is one the server actually knows. -
Make live tests an explicit opt-in instead of a key-shape heuristic, so a plain
swift testcannot spend credits by accident. Done (c02c969):SEARCH_LIVE_TESTSis required in addition to a usable key. -
CI hygiene: SwiftPM cache against the 30-minute budget, SHA-pinned actions, and a scheduled live smoke once credentials exist. Done for the first two (
c02c969): the dependency graph is cached and the actions are pinned by commit SHA. The scheduled live smoke still needs CI secrets that do not exist (see the audit note). -
Cover the interactive display without a desktop. The dashboard's keys, colour and cursor control only run when stdin and stdout are a terminal; a pipe is not one, and pressing keys by hand needs a window on somebody's desktop. A pseudo-terminal is a kernel object with no GUI involved, so
scripts/monitor_tty_smoke.pyattaches a livemcps-monto one, typesp/r/e/c/qin a 120x40 window, and asserts on the frames and escape sequences that come back, against a loopback SearXNG stub with every provider variable scrubbed. Done when: the harness passes locally and in CI. Done (4eaf7e9): CI runs it beside the other smoke tests and it passes there (run34731005495, step 10) with every key exercised. It found thatehid the engine data but left theenginescolumn header behind (62b9e88), and its own first CI run failed while passing locally: PTY reads are chunked, so the assertions were inspecting a half-written frame. A frame now counts only once it is complete, andMONITOR_SMOKE_READ_CHUNK=8dribbles the reads so the partial-frame path is exercised locally rather than only on a loaded runner.
-
Home and Security: delete the false claim that scrapers are discounted or down-weighted
during fusion —
scraperWeightis 1.0 by deliberate design. Done (this pass). -
Installation: three dependencies, not two, and add
mcps-monto the product table. Done (this pass). -
Monitor and README: document
--allow-expensive-probing, the--watchalias and the 60s probe auto-raise. Done (this pass): also corrected the Monitor page's claim that free mode issues no provider searches at all. -
Resolve the
config.envcontradiction: implement the executable-relative fallback or correctAppConfiguration.load's doc comment andexample.env. The Configuration page is already accurate; the promise of a fallback is not kept anywhere. Still open; the wiki was deliberately left correct and the fallback claim was not added. -
Fix stale code comments:
ToolHandlers.swift:5("three tools"),main.swift:11,DuckDuckGoProvider.swift:10(scraper down-weighting),deploy/docker-compose.yml:7-9. Still open (Sources/was out of scope for this documentation pass). -
README and docs drift: the no-key route count, the Parallel and DuckDuckGo figures
(upstream tiers, not our limiters), and the OpenAI report's requirement for a JSON copy of
structuredContentagainst the deliberate human-readable rendering. Partly done (this pass): the no-key route count is corrected to four, and the OpenAI report now specifies a human-readable text block instead of a JSON mirror. The Parallel and DuckDuckGo figures in the README are unchanged.
- ISSUE-7: decide bearer-token auth versus reverse-proxy-only for the HTTP transport. Done: decision recorded — no built-in authentication; loopback is the default; a non-loopback bind warns; a TLS-terminating reverse proxy is the only supported exposed deployment, and bearer-token auth is deliberately out of scope. ISSUE-7 stays open as an accepted limitation. See Security.
-
ISSUE-11: pin the SearXNG image digest. Done (
7e0a3eb): pinned in bothdeploy/docker-compose.ymlanddeploy/provision-node.sh. -
ISSUE-8: register the container daemon for login on this Mac. Done: Docker
Desktop's own auto-start cannot be used here (
AutoStart: false, app-service registration refused by macOS), so a user LaunchAgentcom.mcpsearch.docker-autostartruns/usr/bin/open -a /Applications/Docker.appat login. Installed and loaded; not yet tested through a reboot. Removal steps are in Self-Hosting. -
SearXNG posture: replace the placeholder
secret_key, decidelimiter: false, and decide the node bind address (all interfaces versus Tailscale only). Done (7e0a3eb, this pass):provision-node.shgenerates a per-node secret key and documentslimiter: falseplus the LAN bind; the Mac's compose instance is loopback-only. -
provision-node.sh: verify the replacement before removing the running container, check forpython3andcurl, and stop advertising a fallback address when Tailscale is absent. Done (7e0a3eb): a canary container must answer JSON before the running one is replaced, required tools are checked, and the script reports Tailscale, a LAN fallback, or neither. - ISSUE-10 (blocked): node5 needs the correct account, a password reset or the public key.
-
ISSUE-6 — refused, not planned. A real OpenAI or Anthropic MCP handshake through a
tunnel would need a vendor account, and providing one was declined. The compatibility
claim is therefore bounded to documented rules,
SchemaCompatibilityTests, the HTTP session tests and stdio end-to-end coverage, and is stated that way everywhere rather than left as pending work.
Reviewed as a whole after it was written.
- Dependencies. 47 blocks everything (no local build, no verification loop); 1 → 2, 3 (nothing can be verified until the smoke test passes); 4 → 5, 6; 9 and 26 need task 3's fresh build; 27 needs task 1 so the HTTP smoke actually runs; 34-39 must follow the behaviour changes in 11-19 or they will be written twice.
- Numbering exception. 47 was appended rather than inserted as 1, and 48 was appended to the end of the test phase, so that no identifier referenced from a commit message moves — the same reason the issue IDs are stable. Task 47 still belongs to the first group and is done first; task 48 belongs with the tests.
- Merges made during the audit. The unrelated no-op statement became part of task 23 rather than its own item. ISSUE-17 stayed one issue with two tasks because the caller-visible symptom is identical. The port convention moved out of the security phase, where it did not belong.
-
Deliberately not tasks (they are Ideas or Known limitations, not defects): a disk-backed
result cache, fanning out across several SearXNG instances, a genuinely independent index,
Google CSE and Bing support, JavaScript execution in
web_open. - Blocked, not neglected: task 45 (node5) needs a fact only the operator has — the correct account, a password reset or the installed public key. Task 33's scheduled live job needs CI secrets, and there are none configured; live coverage for adapters without keys cannot be written until keys exist.
- Refused, not blocked: task 46 / ISSUE-6. Providing an OpenAI or Anthropic account was declined, so no vendor round trip will be run and the compatibility claim is stated as bounded instead of pending.
-
Corrections made when the plan was written. The status table said CI was green and it
is not; ISSUE-13 said every run that obtained a runner passed, which stopped being true at
41d5693; the self-referential wiki SHA was removed because no page can name its own commit. -
Completed in the 17-commit pass after
web_answer. Tasks 1–22, 24, 27 (partly), 34–36, 39 (partly), 40–44 and 47 are code-complete, each naming the commit that finished it. Tasks 23, 25, 27 and 39 are partly done and the remainder is stated on the task.**Done**here means verified by a local scratch-path build, the 309-test hermetic suite and both smoke modes; the run that proves them on CI was still queued when this was written, so it is code-complete rather than CI-confirmed. -
Completed in the test-coverage pass (
c02c969,5afa7a7,bc56236). Tasks 26–33 are done except the scheduled live smoke inside 33. The committed HEADbc56236was verified locally at 368 tests, 6 skipped, 0 failures; the CI run for it was still in progress when this page was written, so the done markers are local-verified rather than CI-confirmed. -
Corrected in this documentation pass. ISSUE-4 had already been fixed by the code but
was still listed open, so it moved to the audit trail; ISSUE-5, ISSUE-14–17 were resolved
and removed from the open list; ISSUE-13's blanket "every run passed" was narrowed to the
one real failure at
41d5693, now fixed; the test count, implementation pointer and CI status were brought up to date. - Evidence standard. Every new issue cites a file and line or a measured run. ISSUE-15 was additionally reproduced end to end on this machine rather than inferred from reading.
Measured behaviour worth keeping. None of it is a defect.
Measured against deepseek-flash (DeepSeek-V4.1-Flash), which is the model the account
exposes alongside deepseek-v4-pro. The API lists exactly those two.
| Property | Measurement |
|---|---|
| Latency | ~2 s to synthesise; ~7 s for a whole balanced call including search |
| Cost | ~$0.0003 per answer (1063 in / 229 out at off-peak rates) — ~3 000 answers per dollar |
| Fabricated URLs | none in any run; citations are range-checked and renumbered |
| Grounding failure mode | Abstention, not invention |
| Concurrency limit | 2500 (Flash) versus 500 (Pro) |
It has no web access. That is the finding everything else follows from:
- Asked for the newest macOS it answered "macOS Tahoe 26, version 26.4.1"; the machine actually runs 26.6.2. Confident, specific, wrong.
- Asked for the current Bitcoin price unaided it correctly refused, saying it cannot access live data.
- Grounded in real results for "why unix failed the top 500 list" it replied
INSUFFICIENT— the results established Linux dominates but never explained why Unix declined. Free-running, it invented a plausible explanation instead. - Grounded in real results for the Bitcoin price it produced live figures from six exchanges and noted they disagreed, quoting each with its source.
So the useful configuration is not "send search requests to the LLM", which would return uncited training-data text. It is "search for real documents, then answer only from them". The model's one weakness becomes the safety property: it cannot cite a document the search never fetched.
Two traps worth remembering, both of which shaped the implementation:
-
Thinking mode can return an empty answer with HTTP 200. The API default is
enabled, and the reasoning pass shares the output-token budget. Measured:
completion=4000, reasoning=4000, content="",finish_reason: length. Three of the first five calls returned nothing. Fix: disable thinking explicitly, and retry once with it disabled if content still comes back empty.reasoning_effortmapsminimal→low,medium→high;lowworked,thinking.disabledwas faster still. -
A JSON fixture in a Swift multiline string can silently be invalid.
\\inside"""emits a literal backslash, so a line-continued JSON body becomes unparseable and the test failure points at the server rather than the fixture. Worth recognising before debugging the wrong layer.
Also confirmed: DeepSeek's API is OpenAI-compatible and natively supports the Responses
API and the Anthropic Messages format (https://api.deepseek.com/anthropic) — the same
three surfaces this project targets.
| Provider | Observation |
|---|---|
| Tavily | 50/50 in a soak, 1 credit each, ~1.2–3.2s. Weak on interpretive queries: for "why unix failed the top 500 list" it returned six off-topic technical-support pages while free providers found the actual story. |
| Parallel (anonymous) | Exactly 20 successes, then HTTP 429. Reproduced deliberately. |
| DuckDuckGo | Good results when it works, but throttles to about one query per 10s; a bot challenge arrives as HTTP 202, not 403. |
| Startpage | Blocked by an Anubis proof-of-work challenge. Effectively unusable through plain HTTP. |
| SearXNG (self-hosted) | Aggregates Google CSE and Brave. Served 25/25 queries alongside Tavily with 0 failures — a strictly better no-key fallback than Parallel, though slower. |
Tailscale assigns every device a private overlay IPv4/v6 plus a MagicDNS name. It does not change the public egress, which is whatever NAT or exit node the traffic leaves through. Both matter, for different things: the overlay is how the instances are reached, the egress is what an engine sees and blocks on. Four machines on one router share one public IPv4 no matter how many overlay addresses they hold.
Requesting each engine directly with a browser user agent, which separates "the engine refused us" from "our client is wrong":
| Engine | this Mac (Germany) | node1 (Indonesia) |
|---|---|---|
| DuckDuckGo | HTTP 200, real results | HTTP 000 — name poisoned (rpz.biznet.) |
| Bing | HTTP 200 | HTTP 200 |
| Brave | HTTP 200 | HTTP 200 |
| Mojeek | — | HTTP 200, CAPTCHA page |
| Startpage | HTTP 200 | HTTP 200, challenge page |
Through SearXNG the picture differs from the direct one, which is the single most
useful thing learned here: SearXNG's DuckDuckGo engine is CAPTCHA-challenged even from
the clean German egress, its Bing engine returns "HTTP connection error" from the
Indonesian egress while a plain curl to Bing succeeds there, and Brave answers from
both. A SearXNG engine failing therefore does not mean the network is at fault.
- Google CSE and Brave contribute everywhere, about 20 results each.
- Brave rate limits per IP: rapid successive queries returned "too many requests", and it is measurably less reliable from the nodes than from the Mac.
- DuckDuckGo is the one engine that works from the Mac's egress and nowhere else: our own adapter returned 10/10 there, against SearXNG's persistent CAPTCHA.
- Instances report
unresponsive_enginesper request, which is why the monitor surfaces it — but the same query can succeed on a retry, so a single entry is not a verdict.
- Provider registry weights are all 1.0. The score is
weight / (k + rank), so a weight ratio wider than the reachable rank ratio(k + maxRank) / (k + 1)— about 1.07 for five results atk = 60— lets one provider's entire list outrank another's regardless of relevance. The previous weights spanned 0.8 to 1.1, a ratio of 1.375, and Tavily's sixth result beat Parallel's first by 1.82×. - Quality is carried by corroboration and the per-domain cap, which cannot override rank.
- Nodes are faster as providers than the Mac's local instance: node1 0.48s, node3 0.98s, this Mac 1.32s per query, because their VMs are otherwise idle.
- The server accepts one
SEARXNG_BASE_URLat a time, so the extra instances are a choice of endpoint, not parallel fan-out. - Instance configuration is genuinely identical — all five report the same 15 enabled engines out of 267 known. Earlier per-instance engine differences were per-request flakiness, not drifted config, so a "which instance is better configured" hunt is wasted effort. What differs is reach, and that follows the egress.
-
mcps-mon --probecosts one credit per keyed provider per refresh. A 10s interval would spend ~360 credits/hour and exhaust a 1000-credit month in under three hours, which is why a 60s floor now applies. -
Without
--probe, the dashboard still probes providers once on its first frame — one credit per configured keyed provider — and then never again; the recurring loop is free. It used to probe every sixth refresh unconditionally, roughly one credit per minute per keyed provider, while the docs called free mode free (ISSUE-16). - The Mac's local instance is now created from
deploy/docker-compose.ymland is loopback-only on127.0.0.1:8888, running the pinned digest. It had been published on0.0.0.0:8888and was reachable from the LAN despite being unauthenticated; recreating it from compose fixed that. Verified: HTTP 200 from loopback, HTTP 000 from the LAN address.
Each of these presented as something else during the node rollout:
| Symptom | Real cause |
|---|---|
brew: command not found on a machine that has Homebrew |
An ssh command runs a non-login shell, so brew shellenv never applies |
brew install docker exits non-zero yet installs fine |
It cannot symlink Docker Desktop completions into an absent /Applications/Docker.app
|
docker: command not found after a successful install |
lima's docker.lima already occupies the name, so linking is skipped |
Every pull fails: docker-credential-desktop: executable file not found
|
A leftover ~/.docker/config.json points at the Desktop credential helper |
ssh -n host 'bash -s' < script runs nothing, exit 0 |
-n redirects stdin from /dev/null, so the script is never fed in |
| SSH to a node refuses a password that works elsewhere | Each node's account matches its hostname (node1@node1); there is no shared login |
dig returns rpz.biznet. for a public hostname |
The ISP blocks that name by DNS policy, and it answers the same for 8.8.8.8 and 1.1.1.1, so changing the resolver does not help |
A domain resolves and answers curl from the host, but not from inside a container |
Check whether the failure is the resolver or the request shape before blaming the container network |
swift build sits at 0% CPU forever with no compiler child processes |
.build lives inside Dropbox, which evicted its state files: build.db and debug.yaml carry the compressed,dataless flag, and llbuild blocks in mmap() waiting for a file the provider never materialises. 15 files under .build were dataless when measured, while Sources/ was fine. Build to a scratch path outside Dropbox, or make the folder available offline |
A plain in-tree swift build still stalls after .build is cleaned and marked com.dropbox.ignored, with zero dataless files |
swift-frontend blocks in pread at 0% CPU while fileproviderd saturates a core. The verified local workaround is --scratch-path ~/Library/Caches/MCPSearch/scratch; it is an environment workaround, not a repository requirement — CI builds in-tree on a clean runner |
open -a /Applications/Docker.app does not start at login even though Docker Desktop's own auto-start is on |
Docker's settings carry AutoStart: false with AutoStartError: "option disabled because operation is not permitted when registering app service", so macOS refuses to register the app service. A user LaunchAgent (com.mcpsearch.docker-autostart) is installed instead; it is loaded but has not been tested through a reboot |
Choices that would look arbitrary later without the reasoning.
| Decision | Why |
|---|---|
| No blanket aggregator discount in fusion | It degenerates into provider preference; see the weights note above |
Schemas closed with additionalProperties: false and fully required
|
OpenAI strict mode requires it; the common failure is a missing one, not a present one |
Optional arguments are nullable types, not omitted from required
|
The documented strict-mode idiom; default is not a supported keyword |
try! removed from the server |
An encoding failure should become a tool error, not a crash. The MCP SDK's generic Codable initializer outranks its non-throwing one, so one documented helper handles it |
| Scrapers are opt-in and disabled by default | Their markup is not a contract, and both targets actively defend against automation |
| Testable monitor code lives in the library, not the executable | An executable's symbols cannot be imported by a test target |
A locally skipped provider raises a retryable error, not invalidRequest
|
A transient local rate limit was blaming the caller's query |
The LLM is not a SearchProvider
|
It has no web access, so as a provider it would emit plausible text with invented URLs. It runs only after real results exist and may cite only those |
web_answer is a separate tool, not a web_search mode |
Answering changes the shape of the response (prose + citations, not a result list) and needs a different timeout; overloading web_search would break callers that want documents |
| Synthesis has its own timeout | Generative traffic legitimately takes tens of seconds; the shared 10 s search timeout would turn slow successes into failures |
| Thinking mode disabled by default | With it on the reasoning pass can consume the entire output budget and return empty content under HTTP 200 |
| A synthesis failure still returns the search results | Losing prose is not a reason to lose documents the caller can still use |
SEARCH_SYNTHESIS_REASONING is opt-in rather than auto |
Enabling it silently would reintroduce the empty-answer failure mode by configuration |
| 60s floor on probe intervals | Protects a metered free tier from an accidental 360-credit/hour loop |
SEARCH_CONNECT_TIMEOUT_MS removed rather than implemented |
The transport exposes no connect-only deadline; SEARCH_REQUEST_TIMEOUT_MS already bounds connection establishment, and a knob nothing reads is worse than no knob. A test pins the removal so it cannot return inert |
| Jina is not a search provider |
JinaSearchProvider could never be selected, and Jina is the web_open extraction fallback. The adapter and ProviderID.jina case were deleted; JINA_API_KEY only raises the reader's rate limit and does not affect provider selection or fusion |
| The connection is not pinned to the validated DNS address |
URLSession exposes no way to bind the validated address without breaking TLS certificate validation for the original hostname. The DNS-rebinding window is accepted: it is one DNS TTL, and every redirect hop is re-validated (ISSUE-15 follow-up) |
| The HTTP transport has no built-in authentication | Loopback is the default and a non-loopback bind logs a warning, so an exposed deployment is unauthenticated by design, not by oversight. A TLS-terminating reverse proxy is the only supported exposure and can also authenticate; bearer-token auth is deliberately out of scope (ISSUE-7) |
mcps-mon probes providers once on the first frame, then only on demand |
Populating the dashboard immediately is worth one credit per configured keyed provider, but an unattended dashboard must never spend recurring credits. Free mode was previously making periodic probes while documented as free (ISSUE-16) |
Newest first. Each entry names the commit so the change can be found.
| Item | Commit |
|---|---|
Closed ISSUE-6 as refused: no vendor account will be provided, so the compatibility claim is now explicitly bounded rather than pending — wiki Compatibility gained a scope note and the README's compatibility bullet states the same bound |
decision, f3dd8d9
|
The interactive dashboard is now tested: a pseudo-terminal harness types p/r/e/c/q into a live mcps-mon in CI, with no window and no credentials; it found a stale engines column header and then a chunked-read race in its own assertions |
692d475, 62b9e88, 4eaf7e9
|
A redirected mcps-mon frame was padded to an assumed 120x40 screen, so piped output carried a block of blank lines and the provider and node sections were capped to that height (a provider could be hidden behind "… N more"); the piped path now emits its content in full |
5d655dd |
The monitor's name columns ran into the next one when a provider or node name was truncated (Open Web Se…aggregator); seen only by running the dashboard against the live cluster, now separated and covered by a test |
170fd6f |
Reconciled the README and the compatibility research note: test count, no-key route count, and the human-readable text block instead of a prescribed JSON mirror of structuredContent
|
bc56236 |
Fixed two defects the new tests found, and extended resold-provenance folding to Open Web Search: the monitor's node probe read unresponsiveEngines while SearXNG emits unresponsive_engines, so its unavailable-engine column was always empty; OpenWebSearchProvider documented a bare top-level JSON array it could not decode |
5afa7a7 |
Contract tests for every adapter, the HTTP transport, the fetch-fallback chain and both probes; live tests require SEARCH_LIVE_TESTS; silent skips now fail in CI; soak.py --providers enforced; CI cache and SHA-pinned actions (suite 309 → 368) |
c02c969 |
| Folded a resold page into the index it came from, so search-family corroboration is not double-counted | b3b66fc |
| Jina Reader's advertised budget now fits inside the shared request timeout | 02c22b3 |
One HTTP response per request (HTTPMCPHost could write two for an oversized body); the last shellcheck warning removed |
ff7ffbb |
Deleted JinaSearchProvider, ProviderID.jina, ProviderCapabilities, and Exa's dead content/snippet mapping |
e60203e |
| Pinned the SearXNG image by digest; provisioning validates a canary before replacing a node and generates a per-node secret key | 7e0a3eb |
| Deleted the dead public surface and no-ops, each re-verified to have no caller | a375ddd |
Per-result upstream-engine attribution on SearchResult, so only the resold page loses the aggregator vote |
e1359c0 |
| Last-resort wait for an affordable local throttle instead of returning nothing | 569e6d3 |
Fan-out refill for locally skipped providers; fixed web_open printing the page title twice |
f393947 |
Removed the inert SEARCH_CONNECT_TIMEOUT_MS; transport flags can no longer decide the transport by argument order |
4ef1888 |
| Provider limits installed before the pipeline returns; breaker updates awaited; the whole-search deadline kept off the breaker | 2c9be10 |
| Curated transport error text so a failing URL (and Mojeek's key) cannot reach a diagnostic | 0edc66b |
mcps-mon no longer probes providers periodically without --probe
|
3187ea0 |
| Upstream throttles reported as provider failures rather than "nothing was attempted" | d41becd |
web_open fetch failures report fetchFailed, never a search provider's network failure |
73a5ac0 |
| Closed the SSRF hole in IPv6 literals that embed an IPv4 address (IPv4-mapped, NAT64, 6to4, Teredo) | eb4c52a |
| Fixed the stale smoke-test tool list; the script now requires the documented tools instead of owning the list | de63b81 |
| Suite grew from 287 to 309 tests (6 opt-in live tests) across the pass |
de63b81 … b3b66fc
|
Wiki reconciled with the code: test count, scraper weighting, three dependencies, mcps-mon product and flags, connect-timeout removal, Jina, SSRF, auth decision, DNS-rebinding limitation, OpenAI report |
this pass |
Recreated the local SearXNG from deploy/docker-compose.yml (loopback-only, pinned digest) |
local |
Installed the com.mcpsearch.docker-autostart LaunchAgent for Docker Desktop on this Mac |
local |
Added web_answer: grounded synthesis over fetched results (256 → 287 tests) |
41d5693 |
| Corrected the DuckDuckGo diagnosis to DNS poisoning and documented the egress tables |
81aae9f, edd8c90
|
Cleared 24 build warnings, including an unsafe ChannelHandlerContext capture |
b2a6b82 |
Organised the README and indexed docs/
|
cb10bd2 |
Monitor r key did nothing; probe interval could drain a free tier |
fbe27f9 |
| Provider-kind column cramped; provider header and footer overflowed an 80-column terminal |
edac578, 738411c
|
Added the mcps-mon dashboard (216 → 256 tests) |
edac578 |
| Provisioned SearXNG on node1–4, with Colima and start-at-login | 39ba7db |
| Added self-hosted SearXNG on this machine as a no-key provider | e150388 |
| Fusion degenerated into provider preference (found by live comparison) | 2f20cbd |
| Placeholder credentials were activating the live test suite | 5204fda |
| Added the Streamable HTTP transport | eebab38 |
| Hardened schemas for OpenAI, Anthropic and Open Responses | c7dca46 |
Fixed Tavily published_date never decoding |
34e01bb |
| Fixed error misattribution, silent provider fallback and double discount | 15eeac5 |
| Reconciled histories and pushed the implementation |
7bd7a5c, ae65097
|
Accepted, not scheduled.
-
web_opendoes not execute JavaScript; JS-heavy pages depend on the Jina Reader fallback. - Startpage cannot work through a plain HTTP client.
- Parallel Search MCP's upstream contract is third-party and unverified.
- "Open Web Search" has no authoritative published specification; it is a configurable, defensively parsed aggregator.
- Resold-provenance folding needs per-result engines. SearXNG and Open Web Search report the engines behind each result, so a resold page is folded into the index it came from and counts once. An adapter that reports only a response-level engine list cannot be folded: its whole response receives the aggregator discount without the family being merged.
-
Client compatibility is documentation-based; a vendor round trip will not be run.
Refused, not pending: providing an OpenAI or Anthropic account was declined, so
ISSUE-6 is closed as not planned. The claim is therefore bounded and deliberately stated
as such: the schemas satisfy the documented strict-mode rules and are linted by
SchemaCompatibilityTests, the HTTP transport's session, SSE, origin, session-id and body limits are verified against a real socket, and stdio is verified through the real executable — but no vendor client has completed a handshake against this server. -
Live provider coverage is Tavily-only.
LiveProviderTestsexercises Tavily alone because it is the only key available; every other adapter is verified against stubs and the published API notes rather than live. - SearXNG needs
jsoninsearch.formats; the stock image enables onlyhtml. - The HTTP transport has no built-in auth and no TLS by design, and no server-initiated streaming. A TLS-terminating reverse proxy is the only supported exposed deployment and can also authenticate; bearer-token auth is deliberately out of scope (ISSUE-7).
-
The DNS-rebinding window is accepted.
web_openvalidates the hostname and then connects without pinning the validated address:URLSessionresolves the host again, so a name whose answer changes between validation and connect can still land on a private address. The window is one DNS TTL, and every redirect hop is re-validated. Closing it would require binding the validated address to the connection, whichURLSessiondoes not expose and which would break TLS certificate validation for the original hostname. -
web_answerinherits the search layer's coverage limits: if the providers find nothing usable, there is nothing to ground an answer in, so it returnsresults_onlyor fails at the search phase like any other search. - Google Custom Search JSON and Bing Search are deliberately unsupported: Google's is closed to new customers and retires in 2027, Bing's was retired in August 2025.
Not scheduled, possibly useful.
- A disk-backed result cache. The in-process cache holds 256 entries; this machine has 24 GB of RAM and ~69 GB free disk. Would cut upstream calls for repeated developer queries.
- Query several SearXNG instances in one search. They are faster than the local instance; the limitation is that provider selection takes one URL.
(Removed from this list: a launch agent for the container daemon on this Mac — now installed; see Recently resolved.)