Repository navigation
test(ollama): deduplicate web search fixtures - #118328
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 8:48 PM ET / August 3, 2026, 00:48 UTC. ClawSweeper reviewWhat this changesThe PR consolidates repeated Ollama web-search test responses, setup scaffolding, request assertions, and equivalent parameterized cases in Merge readinessKeep open for the requested maintainer decision. This is a focused, fresh test-maintenance refactor with no runtime, configuration, protocol, dependency, or security change; the current branch retains the provider-contract assertions while centralizing repeated fixtures. Priority: P3 Review scores
Verification
How this fits togetherThe Ollama plugin turns configured host and credential inputs into SSRF-guarded web-search requests, then normalizes returned search results for the generic web-search tool. This test suite mocks that transport boundary and verifies endpoint selection, credential routing, response handling, and setup guidance. flowchart LR
A[Plugin configuration and environment] --> B[Ollama web-search provider]
B --> C[Endpoint and credential selection]
C --> D[SSRF-guarded HTTP request]
D --> E[Response normalization]
E --> F[Generic web-search result]
G[Provider contract tests] --> B
G --> D
Decision needed
Why: The protected Before merge
Agent review detailsSecurityNone. PR surfaceTests -181. Total -181 across 1 file. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Accept the single canonical test-fixture shape after a maintainer confirms the retained provider-contract coverage is the preferred long-term test structure. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR refactors existing test fixtures rather than reporting a current user-facing failure. The retained cases directly exercise the established provider contract through its mocked transport boundary. Is this the best way to solve the issue? Yes. Consolidating repeated fixtures within the existing provider test file is the narrowest maintainable solution; moving this abstraction into production or a cross-plugin test framework would add coupling without serving the cleanup. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 18c9f27e2de3. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
725082f to
5d340a9
Compare
|
Merged via squash.
|
Summary
What Problem This Solves
The test file repeated the same response envelope, release callback, routing sequence, auth headers, environment cleanup, and setup-note assertions across independent scenarios. This made a focused provider contract test 685 lines long and made each contract update require synchronized fixture edits. The refactor keeps one canonical helper per fixture shape and removes 181 net test lines.
Production LOC delta: 0. Test LOC delta: -181. No runtime, config, protocol, or product behavior changes.
Evidence
tbx_01kz2grkfthqycjm3xbnr17dwb(run 30774851207): focused 23/23 passedextensions/ollama553/553 passedcheck:changedpassed, including extension test typecheck, lint, formatting, dead-code scans, boundary checks, and ratchets