Repository navigation
fix(backend): stop probing Ollama from the public setup status route - #113
Conversation
GET /api/v1/setup/status pinged ${OLLAMA_HOST}/api/tags (3 s timeout)
on every call, and the dashboard calls it on first load, so a fresh
install contacted host.docker.internal:11434 with no Ollama provider
configured. Nothing read the result.
- backend: drop ollamaAvailable from the status response and
SetupService.isOllamaAvailable(). Ollama is now reached only through
the existing operator actions: connecting Ollama, which runs
OllamaSyncService.sync(), and POST /api/v1/routing/ollama/sync.
- frontend: drop ollamaAvailable from setup-status.ts and
checkIsOllamaAvailable(), plus its test and mocks.
- e2e: the first boot of no-phonehome-egress points OLLAMA_HOST,
THINKER_LMSTUDIO_BASE_URL and THINKER_LLAMACPP_BASE_URL at loopback TCP
traps. It then calls /setup/status with no provider configured and
fails on any connection or recorded fetch to a runner. setup.e2e-spec
pins the field list.
- docs: the egress section of manifest-guide.md documents the rule.
The response type is local to the controller and the frontend service;
packages/shared has none.
Closes #109
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of #113: fix(backend): stop probing Ollama from the public setup status routeI reviewed head Summary: I found no blockers and no should-fixes. The change is a pure removal of the probe, and the new e2e really catches the old behavior. No high-risk criterion applies. ChecksRemaining callers of the removed field and functions
Ollama is contacted only on operator actions. The PR leaves three paths that read
The new e2e (
Setup flow:
Security:
Project rules:
Tests and CI:
qa-docker: pending. Runtime behavior changes, and the PR is still a draft until FindingsBlockers: none. Should-fix: none. Nits (optional):
Out of scope (pre-existing, not introduced here)
Verdict
Head revisado: 8e63139 |
qa-docker: PR #113 validated in DockerTested SHA: Image
Probe count (SYN packets from the app container, no provider configured, nothing listening on the host ports)
On main, the 19 probes to With a mock listening on 11434, three extra Operator action still worksWith the mock on Notes (not caused by this PR, same on main)
Nothing flaky: every step passed on the first run. Isolation: unique Compose projects with the volume override ( |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-review of #113 at a7d4009 (merge of origin/main)The previous review approved
The PR change is unchanged
CI on a7d4009All 20 check-runs (
qa-docker
The merge changes no runtime file this PR touches, and CI re-ran the e2e suite and the compose smoke on the merged tree, so the result carries over to FindingsNothing changes from the previous review:
No high-risk criterion applies. Head revisado: a7d4009 |
Closes #109
What
GET /api/v1/setup/statusis a public route that the dashboard calls on first load (GuestGuard.tsx,Setup.tsx). On every call it pinged${OLLAMA_HOST}/api/tagswith a 3 s timeout, even with no Ollama provider configured, and nothing read the result. This PR removes that probe.Backend:
ollamaAvailableis gone from the status response andSetupService.isOllamaAvailable()is removed. Ollama is now reached only through the existing operator actions:OllamaSyncService.sync()fromPOST /api/v1/routing/:agentName/providers;POST /api/v1/routing/ollama/sync;Frontend:
ollamaAvailableis gone fromservices/setup-status.ts, along withcheckIsOllamaAvailable(), its tests and the three component-test mocks. No component used it.Shared types: there is no shared type for this response. It lives in the controller and the frontend service, so
packages/sharedis unchanged.E2E: the first boot of
test/no-phonehome-egress.e2e-spec.tsnow pointsOLLAMA_HOST,THINKER_LMSTUDIO_BASE_URLandTHINKER_LLAMACPP_BASE_URLat TCP listeners on ephemeral127.0.0.1ports, called traps. Each trap accepts and drops connections, so it also catches non-fetchsockets and never reaches a runner that happens to run on the machine. The boot runs with no provider configured. The test calls/setup/statustwice and fails if:ollamaAvailable;host.{docker,containers}.internal.test/setup.e2e-spec.tspins the exact field list.Docs: the egress section of
docs/dev/manifest-guide.mdnow has a "Local runners (Setup: não sondar o Ollama local sem provedor configurado #109)" paragraph.Before the fix, the new e2e failed. With the
ollamaAvailableassertion temporarily commented out, the Ollama trap counted 2 connections, one per call, so the trap catches the old probe.Tests
npm run build --workspace=packages/sharednpx tsc --noEmit -p tsconfig.jsonnpx tsc --noEmit -p tsconfig.jsonnpm run lintbackend / frontendnpx jestTZ=UTC npx vitest runTZ=UTC npm run test:e2e:docker --workspace=packages/backendAn earlier full e2e run had one failure:
proxy.e2e-spec.ts› "accepts X-Session-Key header without error" got a 503 while the network was down. That test reaches a real upstream, and the failure is unrelated to this change. It passed on a rerun of that spec and on the full rerun above.Draft
This changes runtime behavior. It stays in draft until
qa-dockerchecks, with passive capture, that boot, setup and dashboard navigation with no provider configured make no connection tohost.docker.internal:11434.🤖 Generated with Claude Code