Skip to content

test(ollama): deduplicate web search fixtures - #118328

Merged
steipete merged 1 commit into
mainfrom
codex/goal100k-ollama-web-search-wave22-2d45
Aug 3, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/goal100k-ollama-web-search-wave22-2d45

Conversation

@steipete

@steipete steipete commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • consolidate repeated guarded response and hosted request fixtures in the Ollama web-search provider tests
  • table-drive repeated endpoint and unavailable SecretRef cases while preserving all 23 expanded test titles and assertions
  • reuse the canonical environment restoration helper and remove repeated tool/setup boilerplate

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

  • local focused: 23/23 passed with exact expanded title visibility
  • final Blacksmith Testbox tbx_01kz2grkfthqycjm3xbnr17dwb (run 30774851207): focused 23/23 passed
  • final Blacksmith Testbox: full extensions/ollama 553/553 passed
  • final Blacksmith Testbox: check:changed passed, including extension test typecheck, lint, formatting, dead-code scans, boundary checks, and ratchets
  • xhigh review caught and the patch restored the historical explicit array/result-object shape guards; final whole-branch xhigh Codex autoreview is clean
  • official Ollama web-search endpoint/docs and current ollama-js request contract inspected; live unauthenticated endpoint probe returned the expected HTTP 401
  • sibling Codex native web-search tool/config contracts inspected directly; this test-only fixture change does not alter that separate protocol

@steipete
steipete marked this pull request as ready for review August 3, 2026 00:23
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 8:48 PM ET / August 3, 2026, 00:48 UTC.

ClawSweeper review

What this changes

The PR consolidates repeated Ollama web-search test responses, setup scaffolding, request assertions, and equivalent parameterized cases in extensions/ollama/src/web-search-provider.test.ts.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep 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
Reviewed head: 5d340a98c515c6111eb3d4605c2cab017e6ebd9c
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused, reviewable test refactor with concrete post-change validation and no identified runtime regression.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The PR body supplies after-refactor Blacksmith Testbox evidence for the focused 23-case test, the full 553-case Ollama extension suite, and changed checks; for this test-only change, that directly demonstrates the intended observable result.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The PR body supplies after-refactor Blacksmith Testbox evidence for the focused 23-case test, the full 553-case Ollama extension suite, and changed checks; for this test-only change, that directly demonstrates the intended observable result.
Evidence reviewed 5 items Changed test surface: The branch changes only the Ollama web-search provider test, introducing shared guarded-response, request, setup-note, and search-result helpers while preserving the provider scenarios.
Runtime owner boundary remains unchanged: Current main keeps endpoint-attempt construction, credential selection, guard-owned timeout, and response handling in the Ollama provider runtime; this PR does not modify that owner path.
Assertions retained across consolidated cases: The branch still explicitly checks local-versus-hosted routing, configured and ambient credential behavior, unavailable SecretRefs, malformed JSON, bounded response handling, and setup notes.
Findings None None.
Security None None.

How this fits together

The 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
Loading

Decision needed

Question Recommendation
Should the maintainers accept this test-only consolidation as the canonical structure for Ollama web-search provider contract coverage? Accept the cleanup: Merge the focused fixture consolidation after normal final-check gating; it retains the provider behavior assertions without changing production code.

Why: The protected maintainer label requires an explicit human acceptance decision even though the review found no concrete correctness, compatibility, or security defect.

Before merge

  • Complete next step (P2) - The protected maintainer label calls for explicit human acceptance; no discrete automated repair is needed.
Agent review details

Security

None.

PR surface

Tests -181. Total -181 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 230 411 -181
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 230 411 -181

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: extensions/ollama/src/web-search-provider.test.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best 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.

Labels

Label justifications:

  • P3: This is a low-risk test-maintenance cleanup with no production behavior change.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR body supplies after-refactor Blacksmith Testbox evidence for the focused 23-case test, the full 553-case Ollama extension suite, and changed checks; for this test-only change, that directly demonstrates the intended observable result.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies after-refactor Blacksmith Testbox evidence for the focused 23-case test, the full 553-case Ollama extension suite, and changed checks; for this test-only change, that directly demonstrates the intended observable result.

Evidence

What I checked:

Likely related people:

  • steipete: Peter Steinberger authored the merged Ollama web-search runtime and test suite, then authored this focused follow-up fixture consolidation. (role: original feature author and recent area contributor; confidence: high; commits: 07b8018fe02f, 5d340a98c515; files: extensions/ollama/src/web-search-provider.ts, extensions/ollama/src/web-search-provider.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-03T00:27:49.995Z sha 725082f10352d04773ea21c0b4537c7951daa606 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/goal100k-ollama-web-search-wave22-2d45 branch from 725082f to 5d340a9 Compare August 3, 2026 00:43
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 3, 2026
@steipete steipete self-assigned this Aug 3, 2026
@steipete
steipete merged commit b653597 into main Aug 3, 2026
95 of 99 checks passed
@steipete
steipete deleted the codex/goal100k-ollama-web-search-wave22-2d45 branch August 3, 2026 04:00
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: ollama maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant