@plainconceptsplatform/workflows 1.21.5 → 1.21.6

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.
@@ -410,10 +410,18 @@ for line in "${candidates[@]}"; do
410
410
  continue
411
411
  fi
412
412
 
413
- meta=$(gh pr view "$pr" --repo "$REPO" --json reviewDecision,commits,closingIssuesReferences 2>/dev/null || echo '{}')
413
+ meta=$(gh pr view "$pr" --repo "$REPO" --json reviewDecision,commits,closingIssuesReferences,body 2>/dev/null || echo '{}')
414
414
  review_decision=$(jq -r '.reviewDecision // ""' <<<"$meta")
415
415
  head_committed=$(jq -r '[.commits[]?.committedDate] | max // ""' <<<"$meta")
416
416
  linked_issue=$(jq -r '.closingIssuesReferences[0].number // ""' <<<"$meta")
417
+ # GitHub links closing keywords only on pull requests into the default branch, so a stack
418
+ # child (into feat/N) has none. The gate reads `Closes #N` from the body instead
419
+ # (identify-gate-subject); the train must find the same issue, or it misses the attempt the
420
+ # gate recorded there, counts a failed gate as a silent one and never retries it.
421
+ if [ -z "$linked_issue" ]; then
422
+ linked_issue=$(jq -r '.body // ""' <<<"$meta" |
423
+ grep -oiE '(close[sd]?|fixe?[sd]?|resolve[sd]?) +#[0-9]+' | grep -oE '[0-9]+' | head -n 1 || true)
424
+ fi
417
425
 
418
426
  # The latest verdict on the pull request or its issue, and how many retries it has had.
419
427
  verdicts=$(
@@ -1951,6 +1951,11 @@ fi
1951
1951
  if ! grep -qF 'contains($prefix)' "$ROUTER_YML" || ! grep -qF 'REFINE_PREFIX: "Refinement update"' "$ROUTER_YML"; then
1952
1952
  LEAD_OK=0; echo "FAIL: the refine auto-accept must find the questions by refine's visible prefix, not only the stripped marker" >&2
1953
1953
  fi
1954
+ # A stack child (into feat/N) has no closingIssuesReferences; the train must read `Closes #N` from the body like the
1955
+ # gate does, or a failed gate's attempt on the issue is invisible and the child is parked as a silent gate forever.
1956
+ if [ -f "${HERE}/../merge-train/merge-train.sh" ] && ! grep -qF "(close[sd]?|fixe?[sd]?|resolve[sd]?) +#[0-9]+" "${HERE}/../merge-train/merge-train.sh"; then
1957
+ LEAD_OK=0; echo "FAIL: the merge train must find a stack child's issue from 'Closes #N' in the body" >&2
1958
+ fi
1954
1959
  if [ "$LEAD_OK" -eq 1 ]; then PASS=$((PASS + 1)); else FAIL=$((FAIL + 1)); fi
1955
1960
  # The harness plugins only load with .opencode/node_modules installed; without it every CI run
1956
1961
  # spawned untiered workers on the session's model. And the tier model a worker pins has to be one
@@ -120,7 +120,10 @@ jobs:
120
120
  # The tag above was created with GITHUB_TOKEN, so its push starts no workflow: a release does
121
121
  # not ship by itself. A workflow_dispatch is the exception GitHub allows that token, so a
122
122
  # release that asked for a deploy starts DEPLOY_WORKFLOW on the tag explicitly. The deploy
123
- # workflow's own `pro` environment rules (required reviewers) still apply.
123
+ # workflow's own `pro` environment rules (required reviewers) still apply. The tagged commit is
124
+ # the one the release pull request just merged, so its main run is usually still building PRE:
125
+ # the platform template's deploy waits for that run, skips the CI it passed and promotes its
126
+ # image, rather than test the same commit again.
124
127
  - name: Deploy the release to production
125
128
  if: steps.release.outputs.deploy == 'true'
126
129
  env:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plainconceptsplatform/workflows",
3
- "version": "1.21.5",
3
+ "version": "1.21.6",
4
4
  "description": "Install and update Platform GitHub agentic workflows.",
5
5
  "keywords": [
6
6
  "github-actions",