# All shell invocations for wiki-refresh eval ## Step 1: Scaffold # Remove any prior fixture rm -rf /tmp/eval-i7-refresh-wiki # Scaffold wiki node /Users/narayan/src/doc-wiki/skills/wiki/scripts/init_wiki.js \ --path /tmp/eval-i7-refresh-wiki \ --domain test-refresh ## Step 2: Write original source # Written via Write tool to /tmp/eval-i7-refresh-wiki/raw/architecture.md # (≥200 words about microservices architecture) ## Step 3: Compute original content hash node -e " const crypto = require('crypto'); const fs = require('fs'); const content = fs.readFileSync('/tmp/eval-i7-refresh-wiki/raw/architecture.md', 'utf8'); const hash = crypto.createHash('sha256').update(content, 'utf8').digest('hex'); console.log('Hash:', hash); " # Output: e4bffe9b83d97bfa297e4ae1e8e2e801b9b928dc492fcd9971e98b767c9d8ee0 ## Step 4: Store original hash in cache node -e " const { storeCache, computeHash } = await import('/Users/narayan/src/doc-wiki/skills/wiki/scripts/cache_manager.js'); const fs = (await import('fs')).default; const content = fs.readFileSync('/tmp/eval-i7-refresh-wiki/raw/architecture.md', 'utf8'); const hash = computeHash(content); storeCache('/tmp/eval-i7-refresh-wiki', hash, { source: 'raw/architecture.md', page: 'wiki/architecture.md', ingested: '2026-04-10T08:00:00+00:00' }); console.log(JSON.stringify({stored: true, hash})); " # Output: {"stored":true,"fresh_hash":"e4bffe9b83d97bfa297e4ae1e8e2e801b9b928dc492fcd9971e98b767c9d8ee0"} ## Step 5: Create wiki/architecture.md with reviewer: alice # Written via Write tool — includes manual field reviewer: alice ## Step 6: Seed edges.jsonl with initial edge cat >> /tmp/eval-i7-refresh-wiki/graph/edges.jsonl << 'EOF' {"from": "wiki/architecture.md", "to": "wiki/auth.md", "type": "extends", "provenance": "INFERRED", "ts": "2026-04-10T08:00:00+00:00", "note": "Architecture page extends auth concepts via API gateway authentication section"} EOF ## Step 7: Create wiki/auth.md stub # Written via Write tool ## Step 8: Emit initial ingest event node /Users/narayan/src/doc-wiki/skills/wiki/scripts/event_logger.js log \ --wiki-root /tmp/eval-i7-refresh-wiki \ --op ingest \ --details '{"source": "raw/architecture.md", "page": "wiki/architecture.md", "hash": "e4bffe9b83d97bfa297e4ae1e8e2e801b9b928dc492fcd9971e98b767c9d8ee0"}' ## Step 9: Modify source (simulate upstream edit — introduces "unified gateway ingress") # Overwritten via Write tool with new v2 content (≥200 words) ## Step 10: Cache check — detect staleness node -e " const { computeHash, checkCache } = await import('/Users/narayan/src/doc-wiki/skills/wiki/scripts/cache_manager.js'); const fs = (await import('fs')).default; const content = fs.readFileSync('/tmp/eval-i7-refresh-wiki/raw/architecture.md', 'utf8'); const hash = computeHash(content); const cached = checkCache('/tmp/eval-i7-refresh-wiki', hash); console.log('New content hash:', hash); console.log('Cache hit:', cached !== null); " # Output: New content hash: a5b1e0b7a9860a4de368f2974bbc6b78438eb2af9fb7cb785d9c97755a674fde # Output: Cache hit: false (STALE) ## Step 11: Re-generate wiki/architecture.md (refresh) # Overwritten via Write tool — preserves reviewer: alice, updates updated/summary/tags/body ## Step 12: Store fresh hash in cache node -e " const { storeCache, computeHash } = await import('/Users/narayan/src/doc-wiki/skills/wiki/scripts/cache_manager.js'); const fs = (await import('fs')).default; const content = fs.readFileSync('/tmp/eval-i7-refresh-wiki/raw/architecture.md', 'utf8'); const hash = computeHash(content); storeCache('/tmp/eval-i7-refresh-wiki', hash, { source: 'raw/architecture.md', page: 'wiki/architecture.md', refreshed: '2026-04-15T00:56:30+00:00' }); console.log(JSON.stringify({stored: true, fresh_hash: hash})); " # Output: {"stored":true,"fresh_hash":"a5b1e0b7a9860a4de368f2974bbc6b78438eb2af9fb7cb785d9c97755a674fde"} ## Step 13: Re-evaluate edges — add new edge for control-plane # Created /tmp/eval-i7-refresh-wiki/wiki/control-plane.md stub cat >> /tmp/eval-i7-refresh-wiki/graph/edges.jsonl << 'EOF' {"from": "wiki/architecture.md", "to": "wiki/control-plane.md", "type": "supports", "provenance": "INFERRED", "ts": "2026-04-15T00:56:30+00:00", "note": "Refreshed architecture introduces unified gateway ingress control plane relationship"} EOF ## Step 14: Emit refresh event node /Users/narayan/src/doc-wiki/skills/wiki/scripts/event_logger.js log \ --wiki-root /tmp/eval-i7-refresh-wiki \ --op refresh \ --details '{ "target_page": "wiki/architecture.md", "source": "raw/architecture.md", "stale_hash": "e4bffe9b83d97bfa297e4ae1e8e2e801b9b928dc492fcd9971e98b767c9d8ee0", "fresh_hash": "a5b1e0b7a9860a4de368f2974bbc6b78438eb2af9fb7cb785d9c97755a674fde", "delta_summary": "Q1 redesign: unified gateway ingress replaces multi-tier gateway; eBPF service mesh; Confluent Cloud Kafka migration; OpenTelemetry unified stack; zero-trust networking added", "edges_added": 1, "edges_removed": 0, "reviewer_field_preserved": true }' ## Step 15: No-op probe (second refresh) node -e " const { computeHash, checkCache } = await import('/Users/narayan/src/doc-wiki/skills/wiki/scripts/cache_manager.js'); const fs = (await import('fs')).default; const content = fs.readFileSync('/tmp/eval-i7-refresh-wiki/raw/architecture.md', 'utf8'); const hash = computeHash(content); const cached = checkCache('/tmp/eval-i7-refresh-wiki', hash); if (cached !== null) { console.log('CACHE_HIT=true'); console.log('NO_OP=true — hash matches cache, no refresh needed'); } " # Output: CACHE_HIT=true # Output: NO_OP=true — hash matches cache, no refresh needed # Events count before: 3, after: 3 (no new events) # Page MD5 before: a24637158873d8ddf191db993e19432a, after: a24637158873d8ddf191db993e19432a