chore: drop hive-mind provenance notes from comments (P2.2)
Comments that pointed at hive-mind-core files, the hive-mind OSS mirror and its drift triage now describe the code as it is. The in-process reranker caches its model in ~/.waggle/models, like the embedder, when the caller passes no directory; the sidecar always passes one.
This commit is contained in:
@@ -1,18 +1,6 @@
|
||||
/**
|
||||
* createEmbeddingProvider tests — ported from
|
||||
* hive-mind/packages/core/src/mind/embedding-provider.test.ts.
|
||||
*
|
||||
* Memory Sync Repair Step 2. Source: hive-mind file at HEAD c363257.
|
||||
*
|
||||
* Verbatim port — only the import path is adjusted from
|
||||
* `./embedding-provider.js` to `../../src/mind/embedding-provider.js`.
|
||||
*
|
||||
* NOTE: waggle-os has additional `tests/embedding-provider-quota.test.ts`
|
||||
* at the top level that exercises tier+quota enforcement (Waggle-only
|
||||
* feature). That file is NOT a substitute for this port — they cover
|
||||
* complementary surfaces: this file pins the generic mock fallback,
|
||||
* dimension respect, deterministic-vector behavior, batch shape, and
|
||||
* reprobe contract; the top-level file pins tier gating.
|
||||
* createEmbeddingProvider tests: the generic mock fallback, dimension respect,
|
||||
* deterministic-vector behavior, batch shape and the reprobe contract.
|
||||
*/
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import {
|
||||
@@ -23,7 +11,7 @@ import {
|
||||
} from '../../src/embeddings/embedding-provider.js';
|
||||
import type { Embedder } from '../../src/embeddings/embeddings.js';
|
||||
|
||||
describe('createEmbeddingProvider (hive-mind port)', () => {
|
||||
describe('createEmbeddingProvider', () => {
|
||||
it('falls back to mock when provider=mock is requested explicitly', async () => {
|
||||
const provider = await createEmbeddingProvider({ provider: 'mock' });
|
||||
expect(provider.getActiveProvider()).toBe('mock');
|
||||
@@ -97,7 +85,6 @@ describe('createEmbeddingProvider (hive-mind port)', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// Reverse-ported from OSS hive-mind (oss-drift triage R5, 2026-06-11).
|
||||
describe('embedding guards (oversized-frame truncation + skip-not-abort)', () => {
|
||||
it('capEmbedText truncates only inputs over the limit', () => {
|
||||
expect(capEmbedText('short', 6000)).toBe('short');
|
||||
|
||||
@@ -1,19 +1,11 @@
|
||||
/**
|
||||
* In-process embedder tests — ported from
|
||||
* hive-mind/packages/core/src/mind/inprocess-embedder.test.ts.
|
||||
*
|
||||
* Memory Sync Repair Step 2. Source: hive-mind file at HEAD c363257.
|
||||
*
|
||||
* Verbatim port — only the import path is adjusted from
|
||||
* `./inprocess-embedder.js` to `../../src/mind/inprocess-embedder.js`
|
||||
* to match waggle-os's tests/mind/ placement convention. Both repos
|
||||
* export the same `normalizeDimensions(input, target)` shape with the
|
||||
* documented "no-copy fast path when dims match" contract.
|
||||
* In-process embedder tests: `normalizeDimensions(input, target)` and its
|
||||
* "no-copy fast path when dims match" contract.
|
||||
*/
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { normalizeDimensions } from '../../src/embeddings/inprocess-embedder.js';
|
||||
|
||||
describe('normalizeDimensions (hive-mind port)', () => {
|
||||
describe('normalizeDimensions', () => {
|
||||
it('returns the same vector when lengths already match', () => {
|
||||
const input = new Float32Array([1, 2, 3, 4]);
|
||||
const output = normalizeDimensions(input, 4);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/**
|
||||
* Logger stderr-routing tests.
|
||||
*
|
||||
* Reverse-ported from OSS hive-mind (oss-drift triage R1, 2026-06-11).
|
||||
* stdout is reserved for program data (MCP stdio transport in
|
||||
* hive-mind-mcp-server, CLI --json envelopes) — a library log line on
|
||||
* stdout corrupts machine consumers, so every level must land on stderr.
|
||||
* stdout is reserved for program data (MCP stdio transports, CLI --json
|
||||
* envelopes) — a library log line on stdout corrupts machine consumers, so
|
||||
* every level must land on stderr.
|
||||
*/
|
||||
import { describe, it, expect, vi, afterEach } from 'vitest';
|
||||
import { createCoreLogger, type CoreLogger } from '../src/logger.js';
|
||||
|
||||
@@ -400,7 +400,6 @@ describe('WorkspaceManager', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// Reverse-ported from OSS hive-mind (oss-drift triage R4, 2026-06-11).
|
||||
describe('ensure', () => {
|
||||
it('rejects a pre-existing workspace junction without writing through it', () => {
|
||||
const outsideDir = fs.mkdtempSync(path.join(os.tmpdir(), 'waggle-ws-outside-'));
|
||||
|
||||
Reference in New Issue
Block a user