v0.5.9 — Design A+ hardening (bg-leak, cancel race, path traversal)
Fixes from a fifth dogfood round (adversarial self-review of the 0.5.8 Design A+ staging code):
- Background review temp-dir leak — the detached worker now always removes its stage dir after reading the response (was leaking one dir per background review).
- Cancel status race —
runJobWorkerno longer overwrites acanceledstatus back tofailedwhen the worker dies just after/agy:cancel. - Stage-dir path traversal —
stageReviewMaterialsrejects absolute /..-escaping changed-file paths (EINVAL on Windows, or writes outside the stage) and verifies the destination stays underfiles/.
Accepted/documented: changed-files-only context (worktree-for-read reintroduces the .git leak we rejected), orphaned child + no-commits edge.
188 unit tests, CI green. /plugin update agy.