@plainconceptsplatform/workflows 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -542,6 +542,7 @@ jobs:
|
|
|
542
542
|
stack-branch: ${{ steps.stack.outputs.stack-branch }}
|
|
543
543
|
stack-in-flight: ${{ steps.inflight.outputs.stack-in-flight }}
|
|
544
544
|
stack-blocked: ${{ steps.blocked.outputs.stack-blocked }}
|
|
545
|
+
flat-blocked: ${{ steps.flatblocked.outputs.flat-blocked }}
|
|
545
546
|
implement-queue: ${{ steps.queue.outputs.queue }}
|
|
546
547
|
steps:
|
|
547
548
|
# Which implement queue this issue waits in. The children of one refine share a queue,
|
|
@@ -695,6 +696,38 @@ jobs:
|
|
|
695
696
|
gh issue comment "$ISSUE_NUMBER" --repo "$REPO" --body-file /tmp/held.md >/dev/null || true
|
|
696
697
|
fi
|
|
697
698
|
|
|
699
|
+
# Unattended, a feature refine did not split takes the flat path, which has no stack to wait
|
|
700
|
+
# in. Blocked by a feature that has not landed, it would build on a default branch without
|
|
701
|
+
# that feature. It is held the same way a child is, and stack-landed releases it.
|
|
702
|
+
- name: Hold an unsplit feature whose blockers have not landed
|
|
703
|
+
id: flatblocked
|
|
704
|
+
if: steps.stack.outputs.is-stack != 'true'
|
|
705
|
+
env:
|
|
706
|
+
GH_TOKEN: ${{ github.token }}
|
|
707
|
+
REPO: ${{ github.repository }}
|
|
708
|
+
ISSUE_NUMBER: ${{ needs.classify.outputs.issue-number }}
|
|
709
|
+
run: |
|
|
710
|
+
set -euo pipefail
|
|
711
|
+
echo "flat-blocked=false" >> "$GITHUB_OUTPUT"
|
|
712
|
+
[ "${UNATTENDED:-false}" = true ] || exit 0
|
|
713
|
+
waiting=""
|
|
714
|
+
for b in $( { gh api "repos/$REPO/issues/$ISSUE_NUMBER/dependencies/blocked_by" --jq '.[].number' 2>/dev/null || true
|
|
715
|
+
gh issue view "$ISSUE_NUMBER" --repo "$REPO" --json body --jq '.body // ""' 2>/dev/null \
|
|
716
|
+
| grep -oiE 'blocked by #[0-9]+' | grep -oE '[0-9]+' || true
|
|
717
|
+
} | sort -u ); do
|
|
718
|
+
gh issue view "$b" --repo "$REPO" --json state --jq '.state' 2>/dev/null | grep -qix open || continue
|
|
719
|
+
waiting="$waiting #$b"
|
|
720
|
+
done
|
|
721
|
+
[ -n "$waiting" ] || exit 0
|
|
722
|
+
echo "::notice::#$ISSUE_NUMBER is blocked by$waiting, not yet landed; holding it."
|
|
723
|
+
echo "flat-blocked=true" >> "$GITHUB_OUTPUT"
|
|
724
|
+
gh issue edit "$ISSUE_NUMBER" --repo "$REPO" --remove-label bot-working >/dev/null 2>&1 || true
|
|
725
|
+
marker='<!-- stack-held -->'
|
|
726
|
+
if ! gh api "repos/$REPO/issues/$ISSUE_NUMBER/comments?per_page=100" --jq '.[].body' 2>/dev/null | grep -qF "$marker"; then
|
|
727
|
+
printf '%s\nHeld until%s have landed on the default branch: this feature builds on them. It keeps `implement` and is released when they merge.\n' "$marker" "$waiting" > /tmp/held.md
|
|
728
|
+
gh issue comment "$ISSUE_NUMBER" --repo "$REPO" --body-file /tmp/held.md >/dev/null || true
|
|
729
|
+
fi
|
|
730
|
+
|
|
698
731
|
- name: Detect an in-flight implement on the feature branch
|
|
699
732
|
id: inflight
|
|
700
733
|
if: steps.stack.outputs.is-stack == 'true'
|
|
@@ -720,7 +753,7 @@ jobs:
|
|
|
720
753
|
|
|
721
754
|
call-implement:
|
|
722
755
|
needs: [classify, authorize, check-implement-pr, check-stack-branch]
|
|
723
|
-
if: needs.classify.outputs.route == 'implement' && needs.authorize.outputs.trusted == 'true' && needs.check-implement-pr.outputs.has-open-pr != 'true' && needs.check-stack-branch.outputs.is-stack != 'true'
|
|
756
|
+
if: needs.classify.outputs.route == 'implement' && needs.authorize.outputs.trusted == 'true' && needs.check-implement-pr.outputs.has-open-pr != 'true' && needs.check-stack-branch.outputs.is-stack != 'true' && needs.check-stack-branch.outputs.flat-blocked != 'true'
|
|
724
757
|
uses: ./.github/workflows/agent-implement.lock.yml
|
|
725
758
|
# One FIFO queue per IMPLEMENT_PARALLELISM slot, chosen by check-stack-branch: the children of
|
|
726
759
|
# one refine always share a queue, independent issues spread across them.
|
|
@@ -1446,6 +1479,20 @@ jobs:
|
|
|
1446
1479
|
done
|
|
1447
1480
|
done
|
|
1448
1481
|
|
|
1482
|
+
# A feature refine did not split waits on the issue itself, held by check-stack-branch with
|
|
1483
|
+
# `implement` kept. It cuts from the default branch, which now has what it waited on.
|
|
1484
|
+
flat=$(gh issue list --repo "$REPO" --state open --label implement --limit 200 \
|
|
1485
|
+
--json number,labels,body \
|
|
1486
|
+
--jq '.[] | select([.labels[].name] | index("bot-working") | not)
|
|
1487
|
+
| select(.body | test("<!-- split-parent: [0-9]+ -->") | not) | .number')
|
|
1488
|
+
for issue in $flat; do
|
|
1489
|
+
depends_on_parent "$issue" || continue
|
|
1490
|
+
[ -z "$(blockers_of "$issue")" ] || { echo "#$issue still waits on other work."; continue; }
|
|
1491
|
+
gh issue edit "$issue" --repo "$REPO" --remove-label implement >/dev/null 2>&1 || true
|
|
1492
|
+
gh issue edit "$issue" --repo "$REPO" --add-label implement >/dev/null
|
|
1493
|
+
echo "Released unsplit feature #$issue."
|
|
1494
|
+
done
|
|
1495
|
+
|
|
1449
1496
|
# The report: what merged without a person, and what the gate noted on the way. One issue
|
|
1450
1497
|
# per feature, written once; its marker makes a rerun a no-op.
|
|
1451
1498
|
marker="<!-- unattended-report: $parent -->"
|