You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: v0.8.0 workdir auto-sync was a no-op (Codex audit catch) (#84)
PR #83 in v0.8.0 added workdir change detection and a changeset hash,
but the underlying run_update only diffed base_commit..HEAD via
detect_changes. So when HEAD hadn't moved, run_update returned
"no changes" even though the worktree was dirty — and we then
cached that no-op as "synced", silently serving stale graph data.
Codex caught this via reproduction: build a temp repo, edit a file
without committing, run update, see "RPG is up to date." Fixed and
re-verified end-to-end:
$ rpg-encoder update
Entities modified: 2
Entities removed: 1
Edges added: 4
$ rpg-encoder search "new_function"
1. new_function_added_without_commit [src/lib.rs:3]
Changes:
- New public APIs in rpg-encoder::evolution:
- run_update_workdir — applies committed + staged + unstaged diff
- run_update_from_changes — applies caller-supplied FileChange list
- MCP auto_sync_if_stale rebuilt to use these:
- Uses workdir diff, not committed-only diff
- Tracks last_auto_sync_workdir_paths for revert detection
(file goes from dirty back to HEAD → re-parse to restore HEAD content)
- On error, does NOT cache markers (silent staleness > retry cost)
- update_rpg MCP tool defaults to workdir-aware sync; --since for
committed-only diff
- CLI `rpg-encoder update` matches: workdir-aware by default
- README "Six crates" → "Seven crates"; tools.rs "17 tools" → "27 tools"
Bumps to v0.8.1 across Cargo.toml, server.json, npm/package.json,
Gemini extension, and CHANGELOG.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ Instead of grepping through files, the LLM calls `semantic_snapshot` once and re
77
77
<imgsrc="diagrams/auto-staleness.webp"alt="Git HEAD moves → RPG Server auto-syncs → update_rpg applies additions/modifications/removals → graph always fresh, zero agent action"width="80%" />
78
78
</p>
79
79
80
-
When git HEAD moves (commits, merges, rebases), the MCP server automatically runs a structural update before responding to the next query. No manual `update_rpg` calls, no stale warnings your agent ignores. The graph owns its own consistency.
80
+
Whenever your working tree changes — committed, staged, or unstaged — the MCP server automatically re-syncs before responding to the next query. A changeset hash over `(path, size, mtime)` means repeated saves of the same file trigger one sync, and idle queries trigger none. Reverts are detected too: if a previously-dirty file returns to its HEAD state, the graph is restored.
81
81
82
82
### Two ways to lift
83
83
@@ -96,7 +96,7 @@ When git HEAD moves (commits, merges, rebases), the MCP server automatically run
0 commit comments