From ce39d2353730cac2be833ec85b8ebcc8374b8d02 Mon Sep 17 00:00:00 2001 From: carlos-alm Date: Mon, 3 Aug 2026 16:05:23 -0600 Subject: [PATCH 1/2] fix(skills): seed current-pr for drain-phase post-merge CI check Phase: Drain Parked PRs pointed at step 2f-bis to verify post-merge CI after a drain-phase merge, but 2f-bis's own script reads the PR number from .codegraph/fixer/current-pr -- a file normal per-issue cleanup already removed by the time draining starts. The drain loop only ever holds the merged PR number in $MERGED_PR. Seed current-pr from MERGED_PR before running 2f-bis's blocks so the lookup resolves. --- .claude/skills/fixer/SKILL.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.claude/skills/fixer/SKILL.md b/.claude/skills/fixer/SKILL.md index cf556cbcb..f53668b0d 100644 --- a/.claude/skills/fixer/SKILL.md +++ b/.claude/skills/fixer/SKILL.md @@ -1209,6 +1209,13 @@ Each pass does three things, in order: Then apply I8 exactly as in step 2f-bis: verify the post-merge `CI` workflow run on `main` for this merge's commit, wait for it if still in progress, and diagnose-and-fix (or confirm-transient-via-rerun) a red result before merging the next parked PR or starting another pass. A drain-phase merge lands on `main` the same way a Phase 2 merge does, so it carries the identical risk of tipping shared CI capacity into failure. + 2f-bis's own script reads the merged PR's number from `.codegraph/fixer/current-pr` — but by the time draining starts, normal per-issue cleanup (2g) has already removed that file, and this loop only ever holds the PR number in `MERGED_PR`. Seed `current-pr` from `MERGED_PR` before running 2f-bis's two bash blocks exactly as written, then remove it again so it does not leak into the next drain iteration: + ```bash + printf '%s\n' "$MERGED_PR" > .codegraph/fixer/current-pr + # ... run 2f-bis's two bash blocks unmodified here ... + rm -f .codegraph/fixer/current-pr + ``` + **After each pass**, record whether it made progress and decide whether to run another one: ```bash From ca8735f76d0e2ac9d09dd8c2c315b68ed4f0981e Mon Sep 17 00:00:00 2001 From: carlos-alm Date: Mon, 3 Aug 2026 16:33:57 -0600 Subject: [PATCH 2/2] fix(skills): trap current-pr cleanup for drain-phase early exits 2f-bis's reused blocks have several exit-1 paths (no matching CI run, still red after a rerun). A plain rm placed after those blocks never ran on any of them, leaving the drain-specific current-pr artifact on disk. Register a trap before invoking the blocks so cleanup always fires, matching the trap pattern already used elsewhere in this file. --- .claude/skills/fixer/SKILL.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.claude/skills/fixer/SKILL.md b/.claude/skills/fixer/SKILL.md index f53668b0d..5476a81a6 100644 --- a/.claude/skills/fixer/SKILL.md +++ b/.claude/skills/fixer/SKILL.md @@ -1209,10 +1209,12 @@ Each pass does three things, in order: Then apply I8 exactly as in step 2f-bis: verify the post-merge `CI` workflow run on `main` for this merge's commit, wait for it if still in progress, and diagnose-and-fix (or confirm-transient-via-rerun) a red result before merging the next parked PR or starting another pass. A drain-phase merge lands on `main` the same way a Phase 2 merge does, so it carries the identical risk of tipping shared CI capacity into failure. - 2f-bis's own script reads the merged PR's number from `.codegraph/fixer/current-pr` — but by the time draining starts, normal per-issue cleanup (2g) has already removed that file, and this loop only ever holds the PR number in `MERGED_PR`. Seed `current-pr` from `MERGED_PR` before running 2f-bis's two bash blocks exactly as written, then remove it again so it does not leak into the next drain iteration: + 2f-bis's own script reads the merged PR's number from `.codegraph/fixer/current-pr` — but by the time draining starts, normal per-issue cleanup (2g) has already removed that file, and this loop only ever holds the PR number in `MERGED_PR`. Seed `current-pr` from `MERGED_PR` before running 2f-bis's two bash blocks exactly as written. Register a trap first: 2f-bis's own blocks contain several `exit 1` paths (no matching CI run found, post-merge CI still red after a rerun), and a plain `rm` placed only after those blocks would never run on any of them, leaving this drain-specific artifact behind: ```bash printf '%s\n' "$MERGED_PR" > .codegraph/fixer/current-pr + trap 'rm -f .codegraph/fixer/current-pr' EXIT # ... run 2f-bis's two bash blocks unmodified here ... + trap - EXIT rm -f .codegraph/fixer/current-pr ```