{
  "name": "smart-ingest: duplicate detected (high similarity)",
  "description": "When a near-duplicate is found (similarity above 0.85), the ingest_doc step is correctly skipped to avoid ingesting duplicate content.",
  "inputs": {
    "text": "A document that already exists in the knowledge base",
    "source": "existing-doc.md",
    "threshold": 0.85
  },
  "mocks": {
    "search": {
      "results": [
        { "text": "A document that already exists in the knowledge base", "score": 0.98 }
      ],
      "resultCount": 1
    },
    "similarity": {
      "similarity": 0.97,
      "model": "voyage-4-large"
    },
    "ingest": {
      "chunks": 1,
      "source": "existing-doc.md",
      "collection": "default"
    }
  },
  "expect": {
    "steps": {
      "check_existing": { "status": "completed" },
      "similarity_check": { "status": "completed" },
      "ingest_doc": { "status": "skipped" }
    },
    "noErrors": true
  }
}
