import assert from 'node:assert/strict';
import test from 'node:test';
import { readJson, readText } from './helpers.ts';

interface DatasetManifest {
  workflow: string[];
}

test('golden setup workflow includes required platform stages', () => {
  const manifest = readJson<DatasetManifest>('setup/golden-dataset/dataset.json');

  for (const stage of ['migration', 'readiness', 'template_registry', 'preview', 'commit', 'verification', 'manifest', 'resume', 'reset']) {
    assert.equal(manifest.workflow.includes(stage), true, `${stage} should be in setup workflow`);
  }
});

test('integration scenarios prohibit manual SQL as happy path', () => {
  const scenarios = readText('docs/setup/integration-scenarios.md');

  assert.match(scenarios, /without manual SQL/i);
});
