GitNexus/docs
samuel mbabhazi 546c5cdc21
fix(wiki): group files again on --force and when many new files arrive (#4035)
* fix(wiki): group files again on --force and when many new files arrive

buildModuleTree reads module_tree.json first, as the tree a user edited
during --review, but every completed generation also writes that file
for the HTML viewer. --force and the "significant new files" path only
deleted first_module_tree.json, so since --review came in (#381) both
reused the previous tree instead of grouping again. On the new-files
path, fullGeneration then skipped every page already on disk and wrote
only the overview: the new files, and the files changed in the same
commits, were not documented.

discardSavedGrouping now drops module_tree.json as well when it still
holds the tree meta.json records, that is, the last generation's
output. A tree edited since then, or written before any generation, is
kept, so --review --force still generates the tree as reviewed.

On the new-files path, removeStalePages deletes the pages of modules
whose files changed, their parent pages and the pages of modules that
are gone. The generation writes the missing pages and keeps the rest.

* test(wiki): size the sub-module fixture so any split gives one page per version

* fix(wiki): ignore key order when telling an edited module tree from a saved one

A module_tree.json whose keys a tool only reordered is the tree the last
generation saved, so --force and a regrouping run drop it as well.

* test(wiki): turn commit signing off in the regroup fixture and mark its copied helper

* fix(wiki): make a regrouping safe to resume and limit it to new indexed files

A run that groups an existing wiki's files again now records the
regrouping in meta.json (commit, tree, pages kept) before it deletes any
page. The next run at that commit completes it from the recorded tree; a
run at another commit deletes the pages it may have written and writes
those modules again. module_tree.json is skipped in memory rather than
deleted, so a failed run leaves it and the viewer as they were.

Only changed paths the graph indexes, at paths that did not exist at the
last generation, count as new files. Diffs are read with -z, so paths
with non-ASCII names match the graph.

The run that follows --review generates the approved tree as it is, even
when it equals the previous one. Stale pages are judged against the
previous tree (slug, name, files, sub-modules), and only pages of the two
trees are deleted. A review-only run leaves index.html alone.

---------

Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
2026-11-22 18:28:21 +00:00
..
languages feat(r): add R language support (#3513) 2026-11-19 17:16:27 +00:00
optimize fix(ingestion): spill lexical scopes under heap pressure for all PDG languages (#4028) 2026-11-22 11:23:21 +00:00
plans feat: add the test scenario map and a Vitest 5 mutation runner (#3686) 2026-10-27 16:46:58 +00:00
cli-reference.md fix(ingestion): spill lexical scopes under heap pressure for all PDG languages (#4028) 2026-11-22 11:23:21 +00:00
deployment.md feat(web): resolve a root-relative GITNEXUS_BACKEND_URL against the page origin (#3640) 2026-10-24 08:45:24 +01:00
editor-setup.md fix(hooks): read a shell search past npx, sudo and git grep (#4024) 2026-11-20 15:17:47 +00:00
mcp-reference.md fix(mcp): avoid Git scans and repeated metadata parsing during discovery (#4000) 2026-11-19 10:34:02 +00:00
wiki-generation.md fix(wiki): group files again on --force and when many new files arrive (#4035) 2026-11-22 18:28:21 +00:00