@plainconceptsplatform/workflows 0.28.11 → 0.28.13

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.
@@ -106,12 +106,7 @@ on:
106
106
  required: false
107
107
  type: string
108
108
  default: first
109
- # The gate jobs that the top-level `if:` reads. gh-aw folds that `if:` into the generated
110
- # activation job but gives activation no dependency on the jobs, so the reference resolves
111
- # to '' and the clause is false -- the agent would never run. The package's own validator
112
- # catches it after compilation; this is the line it asks for, the same one the merge gate
113
- # uses for protected_changes.
114
- needs: [still_open, size_guard]
109
+ needs: [still_open, size_guard, eligibility]
115
110
 
116
111
  jobs:
117
112
  # A route dispatched while the issue was open must not execute after it has been closed. The
@@ -138,6 +133,34 @@ jobs:
138
133
  with:
139
134
  token: ${{ github.token }}
140
135
  issue-number: ${{ inputs.issue-number }}
136
+ # A queued refine run can start long after it was dispatched. If triage concluded
137
+ # needs-maintainer while this run waited in a queue, the issue now carries review and
138
+ # the verdict must stand: the reserve step clears review blindly, so eligibility has to
139
+ # catch it first (Pliny-Bot #372).
140
+ eligibility:
141
+ needs: [still_open]
142
+ if: needs.still_open.outputs.open == 'true'
143
+ runs-on: agents-arc
144
+ permissions:
145
+ issues: read
146
+ outputs:
147
+ eligible: ${{ steps.check.outputs.eligible }}
148
+ steps:
149
+ - name: Check if the issue is parked for review
150
+ id: check
151
+ env:
152
+ GH_TOKEN: ${{ github.token }}
153
+ ISSUE_NUMBER: ${{ inputs.issue-number }}
154
+ run: |
155
+ set -euo pipefail
156
+ labels=$(gh issue view "$ISSUE_NUMBER" --repo "$GITHUB_REPOSITORY" --json labels \
157
+ --jq '[.labels[].name]')
158
+ if jq -e 'index("review")' >/dev/null <<<"$labels"; then
159
+ echo "eligible=false" >> "$GITHUB_OUTPUT"
160
+ echo "::notice::Issue #$ISSUE_NUMBER has the review label. Automated refinement skipped."
161
+ exit 0
162
+ fi
163
+ echo "eligible=true" >> "$GITHUB_OUTPUT"
141
164
  # The size gate, rung 4. Measures the issue before any model starts, because an oversized
142
165
  # body does not fail fast on its own: it produces an agent that explores for seventeen
143
166
  # minutes and then dies mid-generation at the provider's response cap having written
@@ -145,8 +168,8 @@ jobs:
145
168
  # shell, no network beyond one issue read; over either limit it is a refusal, not a
146
169
  # smaller attempt.
147
170
  size_guard:
148
- needs: [still_open]
149
- if: needs.still_open.outputs.open == 'true'
171
+ needs: [still_open, eligibility]
172
+ if: needs.still_open.outputs.open == 'true' && needs.eligibility.outputs.eligible == 'true'
150
173
  runs-on: agents-arc
151
174
  timeout-minutes: 5
152
175
  permissions:
@@ -188,8 +211,8 @@ jobs:
188
211
  # replies re-enters rerefine through the comment route, and the classifier ignores
189
212
  # bot comments, so this comment cannot re-trigger the worker.
190
213
  refuse_big_issue:
191
- needs: [still_open, size_guard]
192
- if: needs.still_open.outputs.open == 'true' && needs.size_guard.outputs.too_big == 'true'
214
+ needs: [still_open, size_guard, eligibility]
215
+ if: needs.still_open.outputs.open == 'true' && needs.eligibility.outputs.eligible == 'true' && needs.size_guard.outputs.too_big == 'true'
193
216
  runs-on: agents-arc
194
217
  timeout-minutes: 5
195
218
  permissions:
@@ -241,8 +264,8 @@ jobs:
241
264
  issue-number: ${{ inputs.issue-number }}
242
265
  labels: ${{ env.WORKING_LABEL }}
243
266
  reserve:
244
- needs: [still_open, size_guard]
245
- if: needs.still_open.outputs.open == 'true' && needs.size_guard.outputs.too_big != 'true'
267
+ needs: [still_open, size_guard, eligibility]
268
+ if: needs.still_open.outputs.open == 'true' && needs.eligibility.outputs.eligible == 'true' && needs.size_guard.outputs.too_big != 'true'
246
269
  runs-on: agents-arc
247
270
  permissions:
248
271
  contents: read
@@ -497,9 +520,10 @@ jobs:
497
520
  # clause every refused issue also looped here -- one human-label visit produced eight
498
521
  # refusal comments and eight "Attempt N of 5" comments, none of which could succeed
499
522
  # (Pliny-Bot #322).
500
- needs: [activation, agent, safe_outputs, validate_output, size_guard]
523
+ needs: [activation, agent, safe_outputs, validate_output, size_guard, eligibility]
501
524
  if: >
502
525
  always() &&
526
+ needs.eligibility.outputs.eligible == 'true' &&
503
527
  needs.size_guard.outputs.too_big != 'true' &&
504
528
  (
505
529
  needs.agent.result != 'success' ||
@@ -629,7 +653,7 @@ jobs:
629
653
  # the implicit success(): a refused skip no longer poisons the agent, while any real
630
654
  # failure -- size_guard erroring, the refusal job erroring mid-refuse, reserve failing --
631
655
  # still blocks it and lands in incomplete.
632
- if: inputs.issue-number != '' && needs.still_open.outputs.open == 'true' && needs.size_guard.outputs.too_big != 'true' && !failure()
656
+ if: inputs.issue-number != '' && needs.still_open.outputs.open == 'true' && needs.eligibility.outputs.eligible == 'true' && needs.size_guard.outputs.too_big != 'true' && !failure()
633
657
 
634
658
  runs-on: agents-arc
635
659
  runs-on-slim: agents-arc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plainconceptsplatform/workflows",
3
- "version": "0.28.11",
3
+ "version": "0.28.13",
4
4
  "description": "Install and update Platform GitHub agentic workflows.",
5
5
  "keywords": [
6
6
  "github-actions",