Skip to content

Feat/component level updater - #111

Merged
anhnh2002 merged 3 commits into
mainfrom
feat/component-level-updater
Sep 17, 2026
Merged

anhnh2002 merged 3 commits into
mainfrom
feat/component-level-updater

Conversation

@anhnh2002

Copy link
Copy Markdown
Collaborator

No description provided.

anhnh2002 and others added 3 commits September 16, 2026 17:42
Replace file-level cache invalidation with a component-level updater:
diff the saved dependency graph against the new one (body hash,
signature, edges, rename pairing), repair the module tree (renames,
deletions, routing rules 1-3, routing agent for orphans, growth check),
build a per-leaf change report (Own / Up / RefCh / Tree), check the
fallback ratios, then run one editing agent per active leaf, in
dependency order, restricted to a write set enforced by
str_replace_editor. Missing pages are regenerated by the normal
pipeline, a stale-name scan fixes leftovers, and every decision,
verdict and call cost lands in update_record.json.

`codewiki generate --update` now runs the new updater (rung 3);
`--update-rung 0` keeps the previous file-level behaviour as the
baseline, rungs 1/2/3b are ablations, and --tau-*/--k-hop/
--max-diff-tokens override the hyperparameters.

Also: LLMBackend.run_update_agent + last_usage on both backends,
allowed_write_paths on CodeWikiDeps, absolute/.. path rejection in the
pydantic-ai editor path, and a guard on the module-level stdout rewrap
in str_replace_editor that broke pytest capture.
… files

The dependency graph is named after the checkout directory. With one
worktree per revision, each update left a new *_dependency_graph.json
next to the older ones, and snapshot_old_graph refused to choose among
several, so the update fell back to a full build with
'previous dependency graph not found'.

- find_any_graph_file: several candidates resolve to the newest (logged)
- prune_superseded_graphs: after a successful update, drop graph files
  other than the current checkout's, so the next update finds one
- tests for both paths
Move the module-level logger definition below the import block so all
imports sit at the top of the file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@anhnh2002
anhnh2002 merged commit b5e9de0 into main Sep 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant