Skip to content

test(ai): ai/rag tests run on edge fakes, one file per behavior - #3905

Merged
dan-petty merged 10 commits into
mainfrom
test/1329-ai-rag-tests-on-edge-fakes
Nov 7, 2026
Merged

dan-petty merged 10 commits into
mainfrom
test/1329-ai-rag-tests-on-edge-fakes

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The tests of src/devops_cli/ai/rag/ now double only edges. They use the shared fakes for Qdrant, the embedder, Valkey, HTTP, the clock, OTLP, the keyring and the cluster. No migrated test patches a devops_cli name or imports a private name.

Each test file now covers one behavior. Hypothesis properties of the chunker are new. The shared fakes gain the scripting that the tests need, and serving_qdrant shows what the real Qdrant client sends. The change touches no code under src/.

Closes #3862

Change: openspec/changes/archive/2026-11-07-3862-ai-rag-tests-on-edge-fakes/

@dan-petty dan-petty added type/test Type test: a new or changed test scope/ai AI review pipeline, personas, prompts, LLM client, or RAG labels Nov 7, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Test and check results (run on the branch tip after the rebase onto origin/main):

  • uv run devops ci: passed (exit 0, 20 min 56 s), all rows green.
  • 362 tests in the migrated scope (329 before).
  • An independent review gave 9 findings. Fixed: new tests for the node backoff cap, too few vectors from a gateway or an Ollama node, a Valkey hit for a prompted model, and a chunker property for Markdown, YAML and Go files. deadline=None is set on each Hypothesis property. The loopback chat test and the two Qdrant address tests now use public calls. The proposal lists the coverage that is lost (stage durations of the RAG histogram, the unreachable vector count check of embed_texts) and the two reads of _client._timeout of the native Qdrant client that stay.
  • Mutation check of the backoff cap: with the cap removed, test_the_wait_between_nodes_stops_growing_at_the_cap fails.

@dan-petty
dan-petty marked this pull request as ready for review November 7, 2026 02:38
@dan-petty
dan-petty merged commit b6af763 into main Nov 7, 2026
23 checks passed
@dan-petty
dan-petty deleted the test/1329-ai-rag-tests-on-edge-fakes branch November 7, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/ai AI review pipeline, personas, prompts, LLM client, or RAG type/test Type test: a new or changed test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(ai): ai/rag tests run on edge fakes, one file per behavior

1 participant