@plainconceptsplatform/workflows 0.16.4 → 0.19.2
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/catalog-installation.js +28 -15
- package/dist/worker-env.js +10 -21
- package/loops/actions/housekeeping/action.yml +41 -5
- package/loops/actions/identify-gate-subject/action.yml +134 -122
- package/loops/actions/require-open-issue/action.yml +59 -0
- package/loops/actions/verify-route-matrix/verify-route-matrix.sh +322 -0
- package/loops/workflows/agent-apply-review.md +33 -3
- package/loops/workflows/agent-audit.md +36 -0
- package/loops/workflows/agent-implement.md +77 -5
- package/loops/workflows/agent-merge-gate.md +1 -0
- package/loops/workflows/agent-refine.md +33 -1
- package/loops/workflows/agent-release.md +4 -4
- package/loops/workflows/agent-triage.md +33 -1
- package/loops/workflows/work-router.yml +25 -11
- package/package.json +2 -2
|
@@ -29,8 +29,8 @@ on:
|
|
|
29
29
|
type: string
|
|
30
30
|
default: "auto"
|
|
31
31
|
|
|
32
|
-
runs-on:
|
|
33
|
-
runs-on-slim:
|
|
32
|
+
runs-on: RunnerLandingZone
|
|
33
|
+
runs-on-slim: RunnerLandingZone
|
|
34
34
|
|
|
35
35
|
secrets:
|
|
36
36
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
@@ -98,7 +98,7 @@ jobs:
|
|
|
98
98
|
always() &&
|
|
99
99
|
needs.agent.result == 'success' &&
|
|
100
100
|
needs.safe_outputs.result == 'success'
|
|
101
|
-
runs-on:
|
|
101
|
+
runs-on: RunnerLandingZone
|
|
102
102
|
permissions:
|
|
103
103
|
contents: write
|
|
104
104
|
steps:
|
|
@@ -205,7 +205,7 @@ jobs:
|
|
|
205
205
|
if: >
|
|
206
206
|
always() &&
|
|
207
207
|
(needs.agent.result != 'success' || needs.safe_outputs.result != 'success')
|
|
208
|
-
runs-on:
|
|
208
|
+
runs-on: RunnerLandingZone
|
|
209
209
|
permissions:
|
|
210
210
|
contents: read
|
|
211
211
|
steps:
|
|
@@ -70,9 +70,41 @@ on:
|
|
|
70
70
|
required: false
|
|
71
71
|
type: string
|
|
72
72
|
default: first
|
|
73
|
+
# The gate job that the top-level `if:` reads. gh-aw folds that `if:` into the generated
|
|
74
|
+
# activation job but gives activation no dependency on the job, so the reference resolves
|
|
75
|
+
# to '' and the clause is false -- the agent would never run. The package's own validator
|
|
76
|
+
# catches it after compilation; this is the line it asks for, the same one the merge gate
|
|
77
|
+
# uses for protected_changes.
|
|
78
|
+
needs: [still_open]
|
|
73
79
|
|
|
74
80
|
jobs:
|
|
81
|
+
# A route dispatched while the issue was open must not execute after it has been closed. The
|
|
82
|
+
# classifier can only see `github.event.issue.state`, which is the state when the event fired
|
|
83
|
+
# and is absent on a workflow_dispatch, and this fleet queues for a runner for ten minutes and
|
|
84
|
+
# more. Numa #659 was closed one second after a comment dispatched refine; the run reached
|
|
85
|
+
# `reserve` thirteen minutes later and refined a closed issue to completion. Read now, once,
|
|
86
|
+
# and gate both the reservation and the agent on it.
|
|
87
|
+
still_open:
|
|
88
|
+
runs-on: agents-arc
|
|
89
|
+
permissions:
|
|
90
|
+
contents: read
|
|
91
|
+
issues: read
|
|
92
|
+
outputs:
|
|
93
|
+
open: ${{ steps.state.outputs.open }}
|
|
94
|
+
steps:
|
|
95
|
+
- name: Checkout workflow actions
|
|
96
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
97
|
+
with:
|
|
98
|
+
persist-credentials: false
|
|
99
|
+
- name: Read the issue state
|
|
100
|
+
id: state
|
|
101
|
+
uses: ./.github/actions/require-open-issue
|
|
102
|
+
with:
|
|
103
|
+
token: ${{ github.token }}
|
|
104
|
+
issue-number: ${{ inputs.issue-number }}
|
|
75
105
|
reserve:
|
|
106
|
+
needs: [still_open]
|
|
107
|
+
if: needs.still_open.outputs.open == 'true'
|
|
76
108
|
runs-on: agents-arc
|
|
77
109
|
permissions:
|
|
78
110
|
contents: read
|
|
@@ -296,7 +328,7 @@ jobs:
|
|
|
296
328
|
${{ env.INCOMPLETE_COMMENT }}
|
|
297
329
|
[View this workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
|
|
298
330
|
|
|
299
|
-
if: inputs.issue-number != ''
|
|
331
|
+
if: inputs.issue-number != '' && needs.still_open.outputs.open == 'true'
|
|
300
332
|
|
|
301
333
|
runs-on: agents-arc
|
|
302
334
|
runs-on-slim: agents-arc
|
|
@@ -242,7 +242,7 @@ permissions:
|
|
|
242
242
|
jobs:
|
|
243
243
|
# Public repositories must check repository permission before an event can start a model.
|
|
244
244
|
authorize:
|
|
245
|
-
runs-on:
|
|
245
|
+
runs-on: RunnerLandingZone
|
|
246
246
|
timeout-minutes: 5
|
|
247
247
|
permissions:
|
|
248
248
|
contents: read
|
|
@@ -345,7 +345,7 @@ jobs:
|
|
|
345
345
|
esac
|
|
346
346
|
|
|
347
347
|
classify:
|
|
348
|
-
runs-on:
|
|
348
|
+
runs-on: RunnerLandingZone
|
|
349
349
|
timeout-minutes: 5
|
|
350
350
|
permissions:
|
|
351
351
|
contents: read
|
|
@@ -402,7 +402,7 @@ jobs:
|
|
|
402
402
|
check-implement-pr:
|
|
403
403
|
needs: [classify, authorize]
|
|
404
404
|
if: needs.classify.outputs.route == 'implement' && needs.authorize.outputs.trusted == 'true'
|
|
405
|
-
runs-on:
|
|
405
|
+
runs-on: RunnerLandingZone
|
|
406
406
|
timeout-minutes: 3
|
|
407
407
|
permissions:
|
|
408
408
|
contents: read
|
|
@@ -493,7 +493,7 @@ jobs:
|
|
|
493
493
|
dispatch-triage:
|
|
494
494
|
needs: [classify, authorize]
|
|
495
495
|
if: needs.classify.outputs.route == 'triage' && needs.authorize.outputs.is_outside_collaborator == 'true'
|
|
496
|
-
runs-on:
|
|
496
|
+
runs-on: RunnerLandingZone
|
|
497
497
|
timeout-minutes: 5
|
|
498
498
|
permissions:
|
|
499
499
|
actions: write
|
|
@@ -621,7 +621,7 @@ jobs:
|
|
|
621
621
|
if: >
|
|
622
622
|
needs.classify.outputs.route == 'bot-approve' &&
|
|
623
623
|
(github.actor == 'app/github-actions' || github.actor == 'platform-devbox[bot]')
|
|
624
|
-
runs-on:
|
|
624
|
+
runs-on: RunnerLandingZone
|
|
625
625
|
timeout-minutes: 5
|
|
626
626
|
permissions:
|
|
627
627
|
actions: write
|
|
@@ -678,7 +678,7 @@ jobs:
|
|
|
678
678
|
github.event.pull_request.head.repo.full_name == github.repository
|
|
679
679
|
)
|
|
680
680
|
)
|
|
681
|
-
runs-on:
|
|
681
|
+
runs-on: RunnerLandingZone
|
|
682
682
|
timeout-minutes: 10
|
|
683
683
|
permissions:
|
|
684
684
|
contents: read
|
|
@@ -871,7 +871,7 @@ jobs:
|
|
|
871
871
|
reconcile-bot-pr-runs:
|
|
872
872
|
needs: classify
|
|
873
873
|
if: needs.classify.outputs.route == 'reconcile-bot-pr-runs'
|
|
874
|
-
runs-on:
|
|
874
|
+
runs-on: RunnerLandingZone
|
|
875
875
|
timeout-minutes: 5
|
|
876
876
|
permissions:
|
|
877
877
|
contents: read
|
|
@@ -1079,12 +1079,26 @@ jobs:
|
|
|
1079
1079
|
-f "inputs[ci-conclusion]=$ci_conclusion" \
|
|
1080
1080
|
-f "inputs[ci-run-id]=$ci_run_id" \
|
|
1081
1081
|
-f "inputs[attempts_so_far]=$attempts"
|
|
1082
|
+
|
|
1083
|
+
# One gate per tick, because that is all the concurrency group can hold. The gate
|
|
1084
|
+
# runs in `merge-belt`, and GitHub keeps only the most recent *pending* run in a
|
|
1085
|
+
# group -- `cancel-in-progress: false` does not change that, it only protects a run
|
|
1086
|
+
# that has already started. A tick that dispatched three gates therefore ran the
|
|
1087
|
+
# last and silently cancelled the other two: no comment, no attempt recorded, and
|
|
1088
|
+
# nothing on the pull request to say it had been passed over. Seen on Pliny-Bot,
|
|
1089
|
+
# where dispatching a gate for PR #135 cancelled the one queued for PR #136.
|
|
1090
|
+
#
|
|
1091
|
+
# Stopping here loses nothing: every pull request eligible this tick is still
|
|
1092
|
+
# eligible next tick, and a run that never started consumes no attempt. The belt
|
|
1093
|
+
# now does one thing and says so, instead of appearing to start work it discarded.
|
|
1094
|
+
echo "One gate dispatched this tick; any other eligible pull request waits for the next one."
|
|
1095
|
+
break
|
|
1082
1096
|
done
|
|
1083
1097
|
|
|
1084
1098
|
audit-close:
|
|
1085
1099
|
needs: classify
|
|
1086
1100
|
if: needs.classify.outputs.route == 'audit-close'
|
|
1087
|
-
runs-on:
|
|
1101
|
+
runs-on: RunnerLandingZone
|
|
1088
1102
|
timeout-minutes: 15
|
|
1089
1103
|
concurrency:
|
|
1090
1104
|
group: audit-close
|
|
@@ -1109,7 +1123,7 @@ jobs:
|
|
|
1109
1123
|
cleanup-artifacts:
|
|
1110
1124
|
needs: classify
|
|
1111
1125
|
if: needs.classify.outputs.route == 'cleanup-artifacts' && !github.event.repository.fork
|
|
1112
|
-
runs-on:
|
|
1126
|
+
runs-on: RunnerLandingZone
|
|
1113
1127
|
timeout-minutes: 15
|
|
1114
1128
|
concurrency:
|
|
1115
1129
|
group: cleanup-artifacts
|
|
@@ -1133,7 +1147,7 @@ jobs:
|
|
|
1133
1147
|
housekeeping:
|
|
1134
1148
|
needs: classify
|
|
1135
1149
|
if: needs.classify.outputs.route == 'housekeeping' && !github.event.repository.fork
|
|
1136
|
-
runs-on:
|
|
1150
|
+
runs-on: RunnerLandingZone
|
|
1137
1151
|
timeout-minutes: 15
|
|
1138
1152
|
concurrency:
|
|
1139
1153
|
group: housekeeping
|
|
@@ -1172,7 +1186,7 @@ jobs:
|
|
|
1172
1186
|
validate:
|
|
1173
1187
|
needs: classify
|
|
1174
1188
|
if: needs.classify.outputs.route == 'validate'
|
|
1175
|
-
runs-on:
|
|
1189
|
+
runs-on: RunnerLandingZone
|
|
1176
1190
|
timeout-minutes: 10
|
|
1177
1191
|
permissions:
|
|
1178
1192
|
contents: read
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plainconceptsplatform/workflows",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.2",
|
|
4
4
|
"description": "Install and update Platform GitHub agentic workflows.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"github-actions",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"README.md"
|
|
27
27
|
],
|
|
28
28
|
"scripts": {
|
|
29
|
-
"build": "tsc --project tsconfig.build.json",
|
|
29
|
+
"build": "tsc --project tsconfig.build.json && node ./scripts/copy-loops.mjs",
|
|
30
30
|
"test": "vitest run",
|
|
31
31
|
"typecheck": "tsc --noEmit --project tsconfig.json",
|
|
32
32
|
"release": "pnpm build && pnpm test && npm publish --access public",
|