Skip to content

wiki: refresh stale provenance anchors after tools/runtime line drift #31

@devswha

Description

@devswha

Summary

Top-level wiki pages are currently mixing fresh test data with stale file:line provenance anchors. The codebase on main passes verification, but wiki/index.md, wiki/GRAPH_REPORT.md, and several community pages still point at pre-refactor line numbers in crates/tools/src/lib.rs and crates/runtime/src/conversation.rs / permission.rs.

This is a docs-only freshness issue: the code is fine, but the wiki's "every factual claim carries a file:line reference" promise is no longer consistently true.

Verification performed

  • Repo baseline: main @ 7a95aa4
  • cargo test --workspace
  • cargo clippy --workspace --all-targets -- -D warnings

Concrete stale claims

  1. Inconsistent snapshot dates at the top level

    • wiki/index.md:6 says: Snapshot: extracted from code on 2026-04-14.
    • But the same wiki tree already cites 2026-04-15 verification/results, e.g.:
      • wiki/GRAPH_REPORT.md:85
      • wiki/pages/conversation-loop.md:118
      • wiki/pages/tools.md:154
    • This makes the top-level entry page look older than the detailed pages it links to.
  2. Tool / ToolRegistry / execute_tool() anchors are stale after crates/tools/src/lib.rs grew substantially

    • Wiki locations:
      • wiki/index.md:54
      • wiki/GRAPH_REPORT.md:17,49-50
      • wiki/pages/tools.md:32-60,146
      • wiki/pages/conversation-loop.md:52,90
    • Wiki still points to:
      • Tool at crates/tools/src/lib.rs:160
      • ToolRegistry at :168
      • execute_tool() / truncation constant around :209-223
    • Current source is now at:
      • Tool trait: crates/tools/src/lib.rs:327-333
      • ToolRegistry: crates/tools/src/lib.rs:336-369
      • MAX_TOOL_OUTPUT_BYTES: crates/tools/src/lib.rs:377
      • execute_tool(): crates/tools/src/lib.rs:380-390
  3. PermissionMode / PermissionPolicy::check() anchors are stale

    • Wiki locations:
      • wiki/index.md:57
      • wiki/GRAPH_REPORT.md:19,37,53
      • wiki/pages/permissions.md:7-34,87-95
    • Wiki still points to:
      • PermissionMode at crates/tools/src/lib.rs:91
      • PermissionPolicy::check() at crates/runtime/src/permission.rs:24
    • Current source is now at:
      • PermissionMode: crates/tools/src/lib.rs:262-266
      • PermissionPolicy::check(): crates/runtime/src/permission.rs:28-50
  4. ConversationLoop anchors are off by a few lines, which breaks the provenance contract on the page meant to explain the loop

    • Wiki locations:
      • wiki/GRAPH_REPORT.md:16,31
      • wiki/pages/conversation-loop.md:10,30,69,89
    • Wiki still points to:
      • ConversationLoop at crates/runtime/src/conversation.rs:21
      • run_turn() around :32-147
      • StreamCallback at :12-19
      • MAX_TOOL_ITERATIONS at :41
    • Current source is now at:
      • StreamCallback: crates/runtime/src/conversation.rs:14-20
      • ConversationLoop: crates/runtime/src/conversation.rs:23-31
      • run_turn(): crates/runtime/src/conversation.rs:34-150
      • MAX_TOOL_ITERATIONS: crates/runtime/src/conversation.rs:43
  5. tools.md has several internal helper anchors that moved by ~150-200 lines

    • Wiki locations:
      • wiki/pages/tools.md:76-101,131-146
    • Wiki still cites:
      • ToolContext at lib.rs:100-105
      • ToolResult at lib.rs:108-149
      • canonicalize_even_if_missing() at lib.rs:36-60
    • Current source is now at:
      • ToolContext: crates/tools/src/lib.rs:268-273
      • ToolResult: crates/tools/src/lib.rs:277-317
      • canonicalize_even_if_missing(): crates/tools/src/lib.rs:71-95

Why this matters

The wiki explicitly promises per-claim provenance (wiki/index.md:7). Once line anchors drift this far, contributors lose trust in the navigation docs and have to manually rediscover the real locations.

Suggested refresh scope

  • Update snapshot dates in:
    • wiki/index.md
    • wiki/GRAPH_REPORT.md
  • Re-anchor stale file:line references in:
    • wiki/index.md
    • wiki/GRAPH_REPORT.md
    • wiki/pages/tools.md
    • wiki/pages/permissions.md
    • wiki/pages/conversation-loop.md
  • After accepting wiki edits, run the normal wiki sync flow (scripts/wiki_sync_check.sh --mark-synced) so the baseline stays aligned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions