@plainconceptsplatform/workflows 1.6.23 → 1.6.41
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.
- package/dist/index.js +12 -1
- package/loops/actions/decide-agent-retry/action.yml +10 -2
- package/loops/actions/housekeeping/action.yml +11 -1
- package/loops/actions/merge-train/action.yml +5 -0
- package/loops/actions/merge-train/merge-train.sh +16 -3
- package/loops/actions/rebase-stale-patch/action.yml +41 -0
- package/loops/actions/rebase-stale-patch/rebase-stale-patch.sh +94 -0
- package/loops/actions/validate-merge-gate-output/action.yml +5 -0
- package/loops/actions/verify-route-matrix/verify-route-matrix.sh +121 -2
- package/loops/docs/diagrams.md +5 -4
- package/loops/scripts/compile-agent-workflows.mjs +13 -0
- package/loops/workflows/agent-apply-review.md +9 -6
- package/loops/workflows/agent-audit.md +7 -4
- package/loops/workflows/agent-implement.md +54 -23
- package/loops/workflows/agent-merge-gate.md +31 -8
- package/loops/workflows/agent-refine.md +10 -7
- package/loops/workflows/agent-release.md +7 -4
- package/loops/workflows/agent-triage.md +9 -6
- package/loops/workflows/shared/opencode-ci.md +63 -8
- package/loops/workflows/shared/platform-defaults.md +30 -17
- package/loops/workflows/work-router.yml +14 -2
- package/package.json +1 -1
|
@@ -134,7 +134,7 @@ env:
|
|
|
134
134
|
# times it tries before leaving the issue to a person. Only machine failures are retried; a
|
|
135
135
|
# verdict the agent reached on purpose is reported and never re-run, because re-running a
|
|
136
136
|
# decision reproduces it.
|
|
137
|
-
HOUSEKEEPING_RETRY_AFTER_HOURS: "
|
|
137
|
+
HOUSEKEEPING_RETRY_AFTER_HOURS: "1"
|
|
138
138
|
HOUSEKEEPING_MAX_RETRIES: "3"
|
|
139
139
|
# A bot pull request older than this with no merge-gate verdict at all is reported, never
|
|
140
140
|
# closed: the janitor deletes branches and labels, never someone's work.
|
|
@@ -157,6 +157,10 @@ env:
|
|
|
157
157
|
# How many times a `blocked` verdict, or a merge that did not happen, is retried once the base
|
|
158
158
|
# branch has moved. After that the pull request waits for a person or a new commit.
|
|
159
159
|
MERGE_TRAIN_MAX_RETRIES: "3"
|
|
160
|
+
# "true" lets a stack root merge itself once every child has landed and CI is green, through the
|
|
161
|
+
# same gate as any pull request: a change over the blast radius limit, a protected path or an
|
|
162
|
+
# unresolved finding still goes to a person. "false" keeps every root for a human.
|
|
163
|
+
MERGE_TRAIN_STACK_ROOT_AUTOMERGE: "true"
|
|
160
164
|
# "true" logs the move the train would make and makes none. For trying the train on a
|
|
161
165
|
# repository before letting it act.
|
|
162
166
|
MERGE_TRAIN_DRY_RUN: "false"
|
|
@@ -752,10 +756,17 @@ jobs:
|
|
|
752
756
|
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
753
757
|
REPO: ${{ github.repository }}
|
|
754
758
|
STACK_BRANCH: ${{ needs.check-stack-branch.outputs.stack-branch }}
|
|
759
|
+
DEFAULT_BRANCH: ${{ github.event.repository.default_branch || 'main' }}
|
|
755
760
|
ISSUE_NUMBER: ${{ needs.classify.outputs.issue-number }}
|
|
756
761
|
ATTEMPTS: ${{ needs.classify.outputs.attempts }}
|
|
757
762
|
run: |
|
|
758
763
|
set -euo pipefail
|
|
764
|
+
# A dispatch on the feature ref runs the feature branch's own copy of the workflows, so a
|
|
765
|
+
# branch cut before a workflow fix keeps running the old one: Pliny-Bot #774 ran every
|
|
766
|
+
# tier on glm-5-2 from feat/767 after main had dropped the pin. Bring the default branch
|
|
767
|
+
# in first. A conflict (409) leaves the branch as it is; the run still goes ahead.
|
|
768
|
+
code=$(gh api -X POST "repos/$REPO/merges" -f base="$STACK_BRANCH" -f head="$DEFAULT_BRANCH" -f commit_message="chore: bring $DEFAULT_BRANCH into $STACK_BRANCH before a child runs" --silent -i 2>/dev/null | head -1 | awk '{print $2}' || true)
|
|
769
|
+
echo "Merged $DEFAULT_BRANCH into $STACK_BRANCH: HTTP ${code:-unknown} (201 merged, 204 up to date, 409 conflict)"
|
|
759
770
|
gh workflow run agent-implement.lock.yml --repo "$REPO" --ref "$STACK_BRANCH" \
|
|
760
771
|
-f issue-number="$ISSUE_NUMBER" \
|
|
761
772
|
-f attempts_so_far="$ATTEMPTS"
|
|
@@ -922,6 +933,7 @@ jobs:
|
|
|
922
933
|
hold-label: ${{ env.MERGE_TRAIN_HOLD_LABEL }}
|
|
923
934
|
max-gate-attempts: ${{ env.MAX_GATE_ATTEMPTS }}
|
|
924
935
|
max-retries: ${{ env.MERGE_TRAIN_MAX_RETRIES }}
|
|
936
|
+
stack-root-automerge: ${{ env.MERGE_TRAIN_STACK_ROOT_AUTOMERGE }}
|
|
925
937
|
max-repairs: ${{ env.MERGE_TRAIN_REPAIRS }}
|
|
926
938
|
dry-run: ${{ env.MERGE_TRAIN_DRY_RUN }}
|
|
927
939
|
ci-run-id: ${{ needs.classify.outputs.ci-run-id }}
|
|
@@ -1265,7 +1277,7 @@ jobs:
|
|
|
1265
1277
|
if [ "${already:-0}" -gt 0 ]; then
|
|
1266
1278
|
echo "Stack #$parent already has a completion announcement; staying silent."
|
|
1267
1279
|
else
|
|
1268
|
-
gh pr comment "$root_pr" --repo "$REPO" --body "Stack complete: all children have merged into the feature branch and CI is green. This root pull request is ready
|
|
1280
|
+
gh pr comment "$root_pr" --repo "$REPO" --body "Stack complete: all children have merged into the feature branch and CI is green. This root pull request is ready to merge into $DEFAULT_BRANCH: the merge gate decides it next, and a person is asked only when its blast radius or a finding says so. $completion_marker"
|
|
1269
1281
|
echo "Stack #$parent complete: announced root PR #$root_pr."
|
|
1270
1282
|
fi
|
|
1271
1283
|
fi
|