Files
thedotmack__claude-mem/tests/codex-transcript-watcher-windows.test.ts
T
Alex Newman 2a0a407340 chore: remove over-engineering findings from repo-wide ponytail audit (wave 1)
Cuts verified dead code, duplication, and speculative abstractions across
14 disjoint areas of the tree: sqlite layer, worker HTTP routes, search
pipeline, server, chroma sync, viewer UI, npx-cli, MCP server, shared/utils,
telemetry/infra, integrations, scripts, tests, and stale plans/evals docs.

Also unifies the Chroma search pipeline onto SearchOrchestrator/strategies
and ports dual-project (merged_into_project) scoping plus dateRange
filtering into ChromaSearchStrategy, which corpus builds need but had
silently lost.

Full audit trail: 65-agent verification workflow wf_160a7862-1a6, 14-agent
execution wf_c7e48c0f-164, 6-agent fixup wf_865f86a4-c6b.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-02 20:49:27 -07:00

30 lines
1.1 KiB
TypeScript

import { describe, it, expect } from 'bun:test';
import { readFileSync } from 'fs';
import { join } from 'path';
const watcherSource = readFileSync(
join(__dirname, '..', 'src', 'services', 'transcripts', 'watcher.ts'),
'utf-8',
);
describe('Codex transcript ingestion on Windows (#2192)', () => {
it('normalizes backslashes to forward slashes before passing the path to scanGlob', () => {
expect(watcherSource).toContain('normalizeGlobPattern');
expect(watcherSource).toContain("inputPath.replace(/\\\\/g, '/')");
expect(watcherSource).toMatch(/scanGlob\(this\.normalizeGlobPattern\(/);
});
it('exposes a public poke() on the file tailer so the recursive root watcher can prod it', () => {
expect(watcherSource).toMatch(/\bpoke\(\): void\b/);
});
it('pokes an existing tailer on root-watcher events instead of returning early', () => {
expect(watcherSource).toMatch(/existingTailer\.poke\(\)/);
});
it('normalizes the resolved path to forward slashes before tailer-map lookup', () => {
expect(watcherSource).toMatch(/resolvePath\(watchRoot, name\)\.replace\(\/\\\\\/g, '\/'\)/);
});
});