stagePRAnatomy materializes the PR snapshot via os.MkdirTemp under the OS temp dir and stores the path on tc.prReview.snapshotDir; only stagePROutput's happy path (implicitly, by the workflow reaching its end) has any chance to clean it up, and no stage currently calls os.RemoveAll on it at all. If any stage from anatomy onward returns an error (parking the task), the snapshot directory is never removed. Needs either an explicit cleanup stage guaranteed to run regardless of where the pipeline stops, or a park/finish hook in the engine that can defer cleanup registered by a stage. Scoped out of archie-core-afbk.3 since it needed a decision about whether workflow.Run should grow a general per-run cleanup hook (an engine change) versus a narrower pr-review-specific fix.
Imported from beads archie-core-adtp · GitHub #1350 · type bug · priority P2 · created 2026-09-27 · closed 2026-10-17
stagePRAnatomy materializes the PR snapshot via os.MkdirTemp under the OS temp dir and stores the path on tc.prReview.snapshotDir; only stagePROutput's happy path (implicitly, by the workflow reaching its end) has any chance to clean it up, and no stage currently calls os.RemoveAll on it at all. If any stage from anatomy onward returns an error (parking the task), the snapshot directory is never removed. Needs either an explicit cleanup stage guaranteed to run regardless of where the pipeline stops, or a park/finish hook in the engine that can defer cleanup registered by a stage. Scoped out of archie-core-afbk.3 since it needed a decision about whether workflow.Run should grow a general per-run cleanup hook (an engine change) versus a narrower pr-review-specific fix.
### Close reason
Shared snapshot cleanup c04874c5
---
_Imported from beads `archie-core-adtp` · GitHub #1350 · type bug · priority P2 · created 2026-09-27 · closed 2026-10-17_
sam
added the mediumbug labels 2026-10-27 13:39:29 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
stagePRAnatomy materializes the PR snapshot via os.MkdirTemp under the OS temp dir and stores the path on tc.prReview.snapshotDir; only stagePROutput's happy path (implicitly, by the workflow reaching its end) has any chance to clean it up, and no stage currently calls os.RemoveAll on it at all. If any stage from anatomy onward returns an error (parking the task), the snapshot directory is never removed. Needs either an explicit cleanup stage guaranteed to run regardless of where the pipeline stops, or a park/finish hook in the engine that can defer cleanup registered by a stage. Scoped out of archie-core-afbk.3 since it needed a decision about whether workflow.Run should grow a general per-run cleanup hook (an engine change) versus a narrower pr-review-specific fix.
Close reason
Shared snapshot cleanup
c04874c5Imported from beads
archie-core-adtp· GitHub #1350 · type bug · priority P2 · created 2026-09-27 · closed 2026-10-17