xonecas.io
8356
Wx

www-xonecas-io / files

www-xonecas-io / tickets / 1023-hidden-or-renamed-projects-stay-in-public-after.md

1.8 KB
1---
2id: 1023
3title: Hidden or renamed projects stay in public/ after a rebuild
4type: bug
5status: done
6priority: p2
7area: site
8created: 2026-11-08T04:09:56Z
9updated: 2026-11-08T20:16:20Z
10source: agent
11moves: 2026-11-08T05:07:41Z inbox doing drag; 2026-11-08T05:26:20Z doing review agent; 2026-11-08T20:16:20Z review done drag
12---
13
14Build (internal/site/build.go) writes only shown projects and never removes others. When a project becomes hidden (overrides.txt 'hide', a fork flag) or is renamed, its old public/projects/<name>/ pages, and since 1015 its public/<name>.git clone, stay in public/ and keep being served.
15
16Seen in the code: the only removals are browse.go:55 (tree/ and blob/ inside a shown project) and clone.go (its own <name>.git). Not reproduced: I did not hide a project and rebuild to watch it.
17
18## Notes
19
20- 2026-11-08 05:26Z (agent): Fixed: a build now removes what earlier builds wrote for projects that are no longer shown, whether hidden or renamed. That covers public/projects/<name>/ and public/<name>.git. New internal/site/prune.go runs at the end of Build and keeps only the shown names plus projects/index.html.
21  
22  /activity is now cleared before it's written. That also covers the leftover year and page folders I noted on 1030, for example when a year drops from 21 pages to 20.
23  
24  Checked:
25  - TestBuild plants projects/a-fork/, a-fork.git and activity/1999/ before building, then checks all three are gone.
26  - With the real data I created public/projects/ghost/, public/ghost.git and public/activity/2026/99/, ran make build, and all three were removed. Left in place: 82 project folders plus index.html, and 82 clones. /activity/ and /activity/2026/21/ still serve.
27  - go vet and go test pass.
28  
29  Not checked: hiding a real project through overrides.txt and rebuilding. The planted folders exercise the same path.