import { describe, expect, it } from 'vitest';
import { existsSync, readFileSync } from 'node:fs';
import { resolve } from 'node:path';

const root = resolve(__dirname, '..');

describe('SET 94e — metasupercache is corpse-rejection-only', () => {
  it('has no meta-watcher source, client method, or repair page slot', () => {
    const runner = readFileSync(resolve(root, 'src/tier1/runner.ts'), 'utf8');
    const localLlm = readFileSync(resolve(root, 'src/core/localLlm.ts'), 'utf8');
    const superbuffer = readFileSync(resolve(root, 'src/tier1/superbuffer.ts'), 'utf8');

    expect(existsSync(resolve(root, 'src/tier1/metaWatcher.ts'))).toBe(false);
    expect(runner).not.toContain('metaWatcher');
    expect(localLlm).not.toContain('summarizeMeta');
    expect(superbuffer).not.toMatch(/repair:\s*\[[^\]]*['"]meta['"]/);
  });
});
