{
  "expectations": [
    {
      "text": "Re-computed content_hash for the source differs from the value stored in .wiki-cache/ from the original ingest — both values appear in the events.jsonl entry as stale_hash and fresh_hash",
      "passed": true,
      "evidence": "events.jsonl op=refresh entry: stale_hash=83c7f5819359...c4f9955dbd38b3ba17 (original cached value), fresh_hash=9b8296857815...410d8ebcd6b23ff30e (new content). Two distinct sha256 hashes; cache_manager confirmed pre-edit hit at stale, post-edit miss at fresh."
    },
    {
      "text": "The corresponding wiki/architecture.md body is updated to reflect new content from the source (a phrase introduced in the modified source appears in the page body)",
      "passed": true,
      "evidence": "wiki/architecture.md body now includes 'Kubernetes', 'PostgreSQL', 'nginx ingress', 'microservices', and the four new component bullets (api-gateway, auth-service, catalog-service, order-service) — all introduced by the source edit. Pre-refresh body said 'single VM', 'SQLite', 'embedded HTTP server'."
    },
    {
      "text": "The page's frontmatter still contains reviewer: alice (manual field preserved); standard managed fields (updated, sources, summary) are refreshed; created is unchanged",
      "passed": true,
      "evidence": "wiki/architecture.md frontmatter: reviewer: alice (preserved); created=2026-04-01 (unchanged from pre-refresh); updated=2026-05-03 (refreshed); summary text now reflects new architecture; tags=[architecture, microservices, kubernetes, postgresql, nginx, api-gateway] (updated)."
    },
    {
      "text": "raw/architecture.md is overwritten with the new source content (its file hash matches the new source)",
      "passed": true,
      "evidence": "shasum raw/architecture.md = b5cfe8cdbdfa1f53450d0632788c038584bd0bb4 (matches new content); cache_manager.check confirms the file's sha256 = 9b8296857815...23ff30e which matches fresh_hash."
    },
    {
      "text": "events.jsonl records op='refresh' with target_page, source, stale_hash, fresh_hash, and a delta_summary string of >=20 chars describing what changed",
      "passed": true,
      "evidence": "events.jsonl entry has op=refresh, target_page='wiki/architecture.md', source='raw/architecture.md', stale_hash + fresh_hash, and delta_summary='Refactored from single-VM SQLite monolith to Kubernetes microservices platform with PostgreSQL and nginx ingress' (109 characters, >>20)."
    },
    {
      "text": "graph/edges.jsonl is re-evaluated — at least one edge whose source is the refreshed page differs from the pre-refresh edge set (added, removed, or retyped). If no edges change, the events entry must explicitly note edges_unchanged: true",
      "passed": true,
      "evidence": "Pre-refresh edges (from=wiki/architecture.md): to=sqlite (supports), to=single-vm (supports). Post-refresh: to=kubernetes (supports), to=postgresql (supports), to=nginx (supports), to=microservices (extends). Both targets and types differ — entire edge set replaced. events entry also has edges_changed: true."
    },
    {
      "text": "A second /doc-wiki:refresh run with no further source modification is a no-op: no new events, hash stays identical, page body unchanged byte-for-byte",
      "passed": true,
      "evidence": "Second cache_manager.check: {\"hit\":true,\"hash\":\"9b8296857815...23ff30e\"}. shasum wiki/architecture.md before/after the second pass: 8df46109271996b46127df7426cdba535cbd18a7 → 8df46109271996b46127df7426cdba535cbd18a7 (identical). raw/architecture.md sha unchanged. No new op=refresh event added."
    }
  ],
  "summary": {"passed": 7, "failed": 0, "total": 7, "pass_rate": 1.0},
  "eval_feedback": {"overall": "All 7 expectations satisfied. The cache correctly detected the stale → fresh hash change; the wiki page body and tags were rewritten to reflect the new microservices architecture; reviewer:alice was preserved while updated was refreshed; the edge set was re-evaluated; a second refresh was a true no-op."}
}
