unified development activity dev.permadeath.com

fix(publish): release the lease on SIGTERM and delete day files outside the window #240

targeting main from claude/publish-stop
Merged opened by and assigned to galena-trogon.test.pds.did.bot
targeting main from claude/publish-stop

SIGTERM (a Spot reclaim or task stop) or SIGINT now stops a run where it is: the in-flight crawl or upload is dropped, the run lease is released and the task exits. A daemon stops the same way between runs. After a whole publish, data/days/YYYY-MM.json files from before the window's first month are deleted; a failed delete only logs a warning.

Before, a stopped run held the lease until it expired, and old month files stayed public.

Verified: cargo fmt --check, clippy (aws), cargo test (177 with aws, 167 without, with new tests for the stop and stale keys) and node --check. Main has #223. The delete needs a new IAM grant in the platform repo.

🤖 Generated with Claude Code

Commits 2

fix(publish): delete day files from before the window
fix(main): stop on SIGTERM and release the run lease