{
  "expectations": [
    {
      "text": "All 8 source files end up as wiki pages (or 8 distinct wiki/*.md files created)",
      "passed": true,
      "evidence": "ls work/wiki/*.md (excluding index/summaries/overview): architecture.md, auth.md, caching.md, database.md, deployment.md, monitoring.md, sdk.md, troubleshooting.md — 8 distinct pages."
    },
    {
      "text": "Each generated wiki page has valid frontmatter with non-empty title + sources + a 4-8 tag list",
      "passed": true,
      "evidence": "Each of the 8 pages has frontmatter title (non-empty), sources (single raw/<name>.md), and 4-5 content tags. e.g., wiki/auth.md has tags=[authentication, jwt, session, refresh-token]."
    },
    {
      "text": "Each source file is copied into raw/ preserving the relative path (raw/architecture.md, raw/auth.md, etc.)",
      "passed": true,
      "evidence": "ls work/raw/ shows architecture.md, auth.md, caching.md, database.md, deployment.md, monitoring.md, sdk.md, troubleshooting.md — exactly 8 files matching the source basenames."
    },
    {
      "text": "events.jsonl records 8 ingest events, each naming the source file and content hash",
      "passed": true,
      "evidence": "First-pass run: events.jsonl lines 2-9 are op=ingest, each with source='docs/<file>.md' and content_hash (64-char hex). Sample: 'source':'docs/auth.md','content_hash':'a84765ae4edcb2462971d1df4acbbdafcda6478945e217eea1fcd9ef022b0674'."
    },
    {
      "text": ".wiki-cache/ (or the caching dir named in wiki.config.yaml) contains 8 per-file hash entries after the first run",
      "passed": true,
      "evidence": "After first run, ls .wiki-cache/ returned 8 .json files keyed by content hash (auth/architecture/caching/database/deployment/monitoring/sdk/troubleshooting). After third pass that count became 9 (the modified auth.md added a new entry), but the post-first-run state matched the expectation exactly."
    },
    {
      "text": "A second run of the same ingest command logs 8 'cache_hit' or 'skipped' entries (or records zero new ingest events) — no file is reprocessed while the content is unchanged",
      "passed": true,
      "evidence": "Second-pass run: 8 cache_hit events appended to events.jsonl (one per file, matching content_hash from first pass). Zero op=ingest events added during the second pass. grep -c '\"op\":\"ingest\"' before/after second pass: 8 → 8."
    },
    {
      "text": "Modifying one file and re-running processes only that one file (one new ingest event; seven cache hits)",
      "passed": true,
      "evidence": "After appending text to docs/auth.md, third pass produced exactly one new op=ingest (source='docs/auth.md', new hash 812ce3adea7c...), and 7 op=cache_hit events for the unchanged files. Final ingest count: 9 (8 original + 1 reingest of auth)."
    }
  ],
  "summary": {"passed": 7, "failed": 0, "total": 7, "pass_rate": 1.0},
  "eval_feedback": {"overall": "All 7 expectations satisfied. Folder ingest produced 8 wiki pages with proper frontmatter; cache_manager.js incrementally tracked content hashes so the second run was a 0-ingest no-op and a single-file edit triggered exactly one re-ingest."}
}
