Repository navigation
Description
Problem
pkgs/atlas-search/worker/test/ — the vitest suite for the atlas-search cache Worker (the per-query Durable Object search cache from #6788: query-key canonicalisation, embedding-space validation, auth gate, embed + fan-out, DO cache hit) — is run by no workflow, flake check, or justfile recipe. It runs only when a human runs npm test in that directory by hand.
Evidence (verified this run at main 0798a9881e)
- Suite: 3 files, 14 tests —
test/key.test.ts(5:normalizeQuerytrim/NFC/case rules plus a hand-built canonical-digest oracle for the DO cache key insrc/key.ts),test/space.test.ts(4:validateEmbedembedding-space consistency — pinned model, full width, dims/vector agreement, finiteness),test/worker.test.ts(5, viacloudflare:testSELF + fetchMock: health-open/search-gated auth, miss embeds + fans out once and the repeat is a byte-identical DO hit, the atlas-search(worker): GET /v1/cache/inspect accepts a whitespace-only query — the post-normalization empty check the search route has is missing, so an empty query is keyed and its Durable Object is queried #6937 whitespace-only-query rejection on both routes, wrong-space embedding refused from the cache, the atlas-search(service): a JSON null 200 from /v1/search throws a raw TypeError — searchService reads effective_ceiling off an unvalidated cast, unlike the validated embed door #6982 null search-service response reported as 502 not a raw TypeError). - Hand run on the laptop in a probe copy (
~/git/fleet/probe-atlas-worker, real worker tree copied verbatim):npm ci(the package ships apackage-lock.json, unlike the github-ci Worker in ci(github-ci): worker vitest suite (22 tests pinning #6949/#6925) run by no workflow — and no package-lock.json, so npm ci cannot run it either #7674) thennpm test→ 3 test files / 14 tests passed, repeated twice with the same result. The suite is green — it is simply never run by automation. - Wiring search:
grep -rn "atlas-search/worker"over.github/, rootflake.nix,lib/,pkgs/atlas-search/flake.nix,pkgs/atlas-search/default.nix,justfile→ no hits;grep -rn "atlas-search"over.github/workflows/*.ymlmatches onlyfleet-search-parity-guard.yml, which checks the Rust pyjson/render writers and never touches the Worker.pkgs/atlas-search/flake.nix:51setschecks.default = atlas-search(the Rust package) — no Worker test check. The only run instructions are manual:pkgs/atlas-search/worker/README.md:49(npm test # vitest + @cloudflare/vitest-pool-workers). - The pins are for live, recently-merged behavior: atlas-search(worker): GET /v1/cache/inspect accepts a whitespace-only query — the post-normalization empty check the search route has is missing, so an empty query is keyed and its Durable Object is queried #6937 (merged 2026-11-07, whitespace-only query on GET /v1/cache/inspect) and atlas-search(service): a JSON null 200 from /v1/search throws a raw TypeError — searchService reads effective_ceiling off an unvalidated cast, unlike the validated embed door #6982 (merged 2026-11-07, validated /v1/search response shape in
searchService) both added their regression tests totest/worker.test.ts— verified by hand at merge time, verified nowhere since.space.test.tsis the Worker-side guard for the embedding-space consistency the design(atlas): cross-tier vector comparability — score normalization when tiers use different embedding models #6060 series is building on (atlas: record embedding_model in atlas_manifest and refuse mixed-model fan-out (#6060 M1/M2) #7646/atlas: embed pipeline and staging promotion assert the mandated embedding model (#6060 M6) #7648, open). - Sibling Workers show the house wiring pattern exists:
pkgs/id/hosted-workerhasid-hosted-worker-tests.yml; the github-ci Worker's unwired suite is filed as ci(github-ci): worker vitest suite (22 tests pinning #6949/#6925) run by no workflow — and no package-lock.json, so npm ci cannot run it either #7674 and the github-backup Worker's as ci(github-backup): worker/test/index.test.mjs (5 tests pinning the queue Worker's auth + KV pagination) run by no workflow — #5937 wired only the Python suite #6085. This Worker — the one standing in front of every fleet search query, holding an indefinite result cache keyed by the digestkey.test.tspins — has neither a workflow nor a filing.
Why it matters
A regression in key.ts's canonical material silently changes every DO cache key (mass invalidation, or worse, cross-config serving — the exact failure key.test.ts's "differs across query and across k" case guards). A regression in validateEmbed lets a foreign-model or truncated embedding into the cache and poisons results indefinitely (the cache has no TTL eviction policy yet, #6805). And the two most recent correctness fixes to this Worker (#6937, #6982) currently have regression protection that executes only on a human's laptop.
Acceptance criteria
- A workflow (house pattern, e.g.
id-hosted-worker-tests.yml/bin-tests.yml: workflow_dispatch + path-gated push-to-main, main tier) runs the suite —npm ci+npm test(vitest) inpkgs/atlas-search/worker— and fails loudly if the suite files are missing, never a silent skip. - The wiring demonstrably executes all 14 tests (run output reports 3 test files / 14 tests passing) on a change touching
pkgs/atlas-search/worker/**. - The suite passes via the wiring on main after the change lands.
Dedup (this run): title/keyword searches for atlas + "vitest", "atlas worker suite", "atlas-search worker" in title, and the three test filenames found no existing filing for this suite's wiring; #6879/#6937/#6982 are live-code defects in this Worker (two of them are what the suite pins), #6330 is PR-tier validation for the atlas-search Rust packages, #6805 is the cache eviction/invalidation follow-on, #7646/#7648 are the #6060 embedding-model slices.
Activity
developing-today commentedon Nov 8, 2026
CODE-2294
dezren39 commentedon Nov 8, 2026
🤖 Agent note · filed
npm ci+npm test→ 3 files / 14 tests passed, twice; wiring greps over .github/, root flake.nix, lib/, pkgs/atlas-search/flake.nix + default.nix, justfile → no hits for the Worker suite.dezren39 commentedon Nov 10, 2026
🤖 Agent note · parked (awaiting triage)
8 remaining items
dezren39 commentedon Nov 11, 2026
agent-note:v1
lane: code-j
task: 13660
issue: #7683
state: triaged
note: Inline triage by lane code-j (runbook section 1c): work kind task/small-fix (already labelled), priority/normal, effort/xs, kind/ci - all confirmed against the issue body. Removed status/needs-triage; claim labels synced (queue/claimed, status/in-progress). First concrete step: create .github/workflows/atlas-search-worker-tests.yml on the id-hosted-worker-tests.yml house pattern (workflow_dispatch + path-gated push-to-main on pkgs/atlas-search/worker/, npm ci + npm test, fail loudly if suite files missing). Acceptance check: wiring executes 3 test files / 14 tests passing on a change touching pkgs/atlas-search/worker/, and the suite passes via the wiring on main after landing. Continuing to the fix in this same session.
dezren39 commentedon Nov 11, 2026
agent-note:v1
lane: code-j
task: 13660
issue: #7683
stage: parked
note: Task 13660 parked as CI wait on PR #8497. Triaged inline by lane code-j (task/small-fix, priority/normal, effort/xs, kind/ci) and fixed in the same session: new .github/workflows/atlas-search-worker-tests.yml on the id-hosted-worker-tests.yml house pattern (workflow_dispatch + path-gated push-to-main on pkgs/atlas-search/worker/**, main tier; fails loudly if any suite file or manifest/lockfile is missing; npm ci + npm test). Verified in the worktree with the workflow's own commands: 3 test files / 14 tests passed. PR #8497 is OPEN and MERGEABLE, checks QUEUED in the fleet CI stall. Resume: checks green + Codex clean, merge PR #8497 (closes this issue), then confirm the new workflow runs on main.
dezren39 commentedon Nov 11, 2026
🤖 Agent note · done
pr_opened)..github/workflows/atlas-search-worker-tests.yml(+60), running the atlas-search worker vitest suite (npm ci + npm test) on pushes to main touchingpkgs/atlas-search/worker/and on dispatch, with a fail-if-missing guard so a green run cannot be a silently skipped suite. Codex review completed with zero findings. Checks queued with no failures (merged per fleet policy for a verified, Codex-clean PR); the suite itself was hand-verified at filing (3 files / 14 tests passed, twice).activeand its first run (42967700776) fired on main from the merge push (queued at readback).