#67 build never cleans out/: deleted issues/files keep being served

closedcorrectnessopened
details
updated
id
158745a1-039d-4d34-b51a-1453268693ea

run_build never cleans the output directory — it only create_dir_alls the subdirs it needs. Anything a previous build wrote and the current build no longer produces stays on disk and keeps being served.

Verified:

$ hu13 build . -o out                       # issue 2222… exists -> issues/2222….html
$ git rm -r .forge/issues/2222… && hu13 build . -o out
$ ls out/issues/
22222222-2222-4222-8222-222222222222.html    # still there, still served by `serve`/Pages
$ grep -l "secret body" out/issues/*.html
out/issues/22222222-2222-4222-8222-222222222222.html

Same for deleted repo files (raw/, files/), closed/renamed commits, removed wiki pages and releases. repo.git is removed explicitly since #54, everything else is not.

Consequences: "delete an issue" and "close/rename a page" do not unpublish; a Pages deploy of a stale dist/ quietly keeps removed content reachable by URL. For an inbox-adjacent project that is a privacy bug, not just tidiness.

Fix options:

Acceptance:

Comments (1)

all issues