fix: fix: triage agent must clean up throwaway debug branch on exit/crash (#341) #346

Merged
dev-bot merged 1 commit from fix/issue-341 into main 2026-04-07 08:44:03 +00:00

1 commit

Author SHA1 Message Date
Agent
c29d49cd5c fix: fix: triage agent must clean up throwaway debug branch on exit/crash (#341)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
Add an EXIT trap in entrypoint-reproduce.sh that:
- Switches back to the primary branch
- Deletes the triage-debug-${ISSUE_NUMBER} branch

This ensures the throwaway branch used for debug instrumentation
(console.log, verbose logging) is cleaned up if the agent crashes
or times out, preventing repository pollution.

The trap is combined with existing cleanup (heartbeat kill, stack
lock release) into a single EXIT handler.
2026-04-07 08:41:11 +00:00