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
{{ message }}
Repository navigation
backup_if_protected snapshots GRAPH_REPORT.md after cluster-only/label overwrite it, so the previous report is unrecoverable — and graph.html is outside the backup set #2402
backup_if_protected (added in #834, to "protect semantic and curated graphs from silent overwrite via dated-folder backup") is called in cluster-only / labelafterGRAPH_REPORT.md has already been overwritten. The dated backup folder therefore contains the new report, and the previous one is unrecoverable.
The other artifacts are handled correctly — the write happens after the backup call:
So GRAPH_REPORT.md is the one artifact in _BACKUP_ARTIFACTS whose snapshot is taken post-write.
Why it matters: the report is the cheapest before/after diff available — community count, labels, hubs. The moment you most want the previous copy is right after a re-cluster, which is exactly when labels churn (#2298, #1653). We wanted to diff the pre-run report against the post-run one and found the dated folder already held the new version.
Fix: move _backup(out) above line 1657.
Same area: graph.html is outside the backup set, and --no-viz deletes it
The comment there explains the intent — avoid leaving a stale graph.html from an interrupted run — which is reasonable, but the effect is that cluster-only --no-viz destroys the previous visualization with no copy anywhere. On a large graph that HTML is expensive to regenerate.
We hit this on a repair run: we used --no-viz deliberately (to run export html separately afterwards) and the previous graph.html was simply gone in between. It survived only because the next command regenerated it.
Either adding graph.html to _BACKUP_ARTIFACTS, or deferring the unlink until a replacement exists, would close it.
Activity