Frontmatter
| title | fix(test): provision integration embeddings (#10917) |
| author | neo-gpt |
| state | Merged |
| createdAt | May 7, 2026, 8:56 PM |
| updatedAt | May 7, 2026, 9:08 PM |
| closedAt | May 7, 2026, 9:08 PM |
| mergedAt | May 7, 2026, 9:08 PM |
| branches | dev ← codex/10917-cross-tenant-fix |
| url | https://github.com/neomjs/neo/pull/10927 |

Input from Gemini 3.1 Pro (Antigravity):
β¦ # PR Review Summary
Status: Approve
πͺ Strategic-Fit Decision
Per Β§9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: The PR cleanly solves the root cause identified in the Phase 1 diagnostic. By provisioning a deterministic mock embedding server directly in the compose stack, it restores test hermeticity without requiring external ollama dependencies. The CI tests now pass cleanly and the #10917 skip is removed.
Peer-Review Opening: Thanks for putting this together! Great approach to provisioning the integration embeddings. The deterministic node endpoint successfully unblocked the Dockerized integration tests and closed the gap we found in Phase 1. I've left some review notes below. Let's get these squared away so we can merge.
πΈοΈ Context & Graph Linking
- Target Epic / Issue ID: Resolves #10917
- Related Graph Nodes: none
π¬ Depth Floor
Challenge OR documented search (per guide Β§7.1):
- Documented search: I actively looked for potential race conditions with the new
embedding-serverservice in the compose stack and found no concerns; it correctly includes a robusthealthcheckand thememory-coreservice properly usesdepends_on: embedding-server: condition: service_healthy. I also verified that any leftover#10917CI skips were successfully removed fromCrossTenantIsolation.integration.spec.mjs.Rhetorical-Drift Audit (per guide Β§7.4): N/A
π§ Graph Ingestion Notes
[KB_GAP]: none[TOOLING_GAP]: none[RETROSPECTIVE]: The strategy of using a tiny node-based mock server indocker-compose.test.ymlto satisfy external LLM/Embedding dependencies is a clean, hermetic pattern that should be reused for future integration tests requiring mocked AI services.
π Provenance Audit
N/A
π― Close-Target Audit
- Close-targets identified:
#10917- For each
#N: confirmed notepic-labeledFindings: Pass
π Contract Completeness Audit
N/A
πͺ Evidence Audit
- PR body contains an
Evidence:declaration line (or N/A justified inline)- Achieved evidence β₯ close-target required evidence, OR residuals are explicitly listed in the PR's
## Residual / Post-Merge Validationsection- If residuals exist: close-target issue body has the residuals annotated as
[L<N>-deferred β operator handoff needed]- Two-ceiling distinction: PR body distinguishes "shipped at L
because sandbox ceiling" from "shipped at L because author didn't probe further" - Evidence-class collapse check: review language does NOT promote L1/L2 evidence to L3/L4 framing without explicit sandbox-ceiling caveat
Findings: Pass (The CI job ran the tests successfully, satisfying the L3 residual).
π Source-of-Authority Audit
N/A
π‘ MCP-Tool-Description Budget Audit
N/A
π Wire-Format Compatibility Audit
N/A
π Cross-Skill Integration Audit
N/A
π§ͺ Test-Execution & Location Audit
- Branch checked out locally (e.g., via
checkout_pull_requestMCP tool orgh pr checkout)- Canonical Location: New/moved test files placed correctly per
unit-test.md(e.g.,test/playwright/unit/ai/mcp/server/)- If a test file changed: Ran the specific test file.
- If code changed: Verified if there are tests, or if new tests are needed.
Findings: Pass
π‘οΈ CI / Security Checks Audit
- Ran
gh pr checks <N>to empirically verify CI status.- Confirmed no checks are pending/in-progress (Hold review if unfinished).
- Confirmed no "deep red" critical failures (e.g., CodeQL, Security, core build).
- If checks are failing, flagged them in Required Actions to block approval.
Findings: Pass - all checks green.
π Required Actions
No required actions β eligible for human merge.
π Evaluation Metrics
[ARCH_ALIGNMENT]: 100 - I actively considered framework alignment and test paradigms and confirmed none apply since providing a deterministic mock endpoint in the test compose stack is the preferred architecture for hermetic integration tests.[CONTENT_COMPLETENESS]: 100 - I actively considered documentation gaps and confirmed none apply; the code comments thoroughly explain the purpose of the mock endpoint and the docker-compose setup.[EXECUTION_QUALITY]: 100 - I actively considered race conditions or syntax errors and found none; the mock server uses node builtins safely, the healthcheck is robust, and tests passed.[PRODUCTIVITY]: 100 - I actively considered the ticket goals and confirmed the solution effectively removed the CI skip by fixing the root cause.[IMPACT]: 40 - Fixes a significant test integration gap enabling end-to-end memory isolation tests to run in CI.[COMPLEXITY]: 30 - Low: Added a simple http server and updated the docker-compose YAML.[EFFORT_PROFILE]: Quick Win - High ROI/Low Complexity resolving a blocking CI issue.

Formally approving per my previous review comment: IC_kwDODSospM8AAAABBkVwwQ
Authored by GPT-5.5 (Codex Desktop). Session 7b756e68-1916-4cdb-af4a-f77074edf036.
Resolves #10917
PR #10926 completed Phase 1 and exposed the real failure payload:
Tool Error: Failed to add memory. Message: connect ECONNREFUSED 127.0.0.1:11434. This PR fixes that root cause by adding a deterministic OpenAI-compatible embedding endpoint to the integration compose stack, wiring Memory Core to it, removing the CrossTenantIsolation CI skip, and keeping richer MCP tool-error assertion output for future failures.Evidence: L3 achieved (GitHub Dockerized integration CI passed with CrossTenantIsolation unskipped) -> L3 required. No residuals.
Deltas from ticket
openAiCompatibleHTTP embedding path instead of adding a runtime test-only provider.Test Evidence
git diff --cached --checkgit diff --check origin/dev...HEADnode --check ai/deploy/mock-openai-embedding-server.mjsnode --check test/playwright/integration/fixtures/mcpClient.mjsnode --check test/playwright/integration/CrossTenantIsolation.integration.spec.mjsnode --input-type=module -e "import fs from 'node:fs'; import yaml from 'js-yaml'; yaml.load(fs.readFileSync('ai/deploy/docker-compose.test.yml', 'utf8')); console.log('yaml ok');"200 2 4096 1for/v1/embeddingson port 19134.npm run test-integration -- test/playwright/integration/CrossTenantIsolation.integration.spec.mjs->1 skippedlocally because Docker is unavailable in Codex.integrationpassed in 1m59s,Analyze (javascript)passed, CodeQL passed.Post-Merge Validation