code-foundry 1.53.7 → 1.53.8
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/.github/workflows/release.yml +71 -50
- package/CHANGELOG.md +8 -8
- package/package.json +1 -1
|
@@ -554,56 +554,77 @@ jobs:
|
|
|
554
554
|
# A ready head already receives synchronize validation. Preserve
|
|
555
555
|
# its live/completed owner instead of cancelling and reallocating
|
|
556
556
|
# CI every time another queued main release run prepares it.
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
(.
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
elif
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
557
|
+
#
|
|
558
|
+
# GitHub registers the synchronize run for a head this job (or
|
|
559
|
+
# Release Please) just pushed a few seconds after the push. An
|
|
560
|
+
# absent owner is therefore polled for a bounded window before the
|
|
561
|
+
# canonical transition, so the transition does not cancel that
|
|
562
|
+
# run. A cancelled, skipped or neutral owner is already terminal
|
|
563
|
+
# and transitions at once; after the window an absent owner
|
|
564
|
+
# still gets the explicit transition, and a failed one still fails.
|
|
565
|
+
owner_poll=1
|
|
566
|
+
while :; do
|
|
567
|
+
runs=$(GH_TOKEN="$VALIDATION_TOKEN" gh api \
|
|
568
|
+
"repos/$GITHUB_REPOSITORY/actions/runs" --method GET \
|
|
569
|
+
-f event=pull_request -f head_sha="$PR_HEAD" -f per_page=100)
|
|
570
|
+
validation=$(jq -er --arg head "$PR_HEAD" --arg branch "$PR_BRANCH" \
|
|
571
|
+
--arg repo "$GITHUB_REPOSITORY" '
|
|
572
|
+
def active: .status == "queued" or .status == "in_progress" or
|
|
573
|
+
.status == "waiting" or .status == "pending" or .status == "requested";
|
|
574
|
+
def valid_run:
|
|
575
|
+
type == "object" and
|
|
576
|
+
(.id | type == "number" and . > 0 and floor == .) and
|
|
577
|
+
(.run_attempt | type == "number" and . >= 1 and floor == .) and
|
|
578
|
+
(.head_sha | type == "string" and test("^[a-f0-9]{40}$")) and
|
|
579
|
+
(.head_branch | type == "string" and length > 0) and
|
|
580
|
+
(.event | type == "string" and length > 0) and
|
|
581
|
+
(.repository | type == "object") and
|
|
582
|
+
(.repository.full_name | type == "string" and length > 0) and
|
|
583
|
+
(.path | type == "string" and length > 0) and
|
|
584
|
+
((active and has("conclusion") and .conclusion == null) or
|
|
585
|
+
(.status == "completed" and
|
|
586
|
+
(.conclusion == "success" or .conclusion == "failure" or
|
|
587
|
+
.conclusion == "timed_out" or .conclusion == "action_required" or
|
|
588
|
+
.conclusion == "cancelled" or .conclusion == "skipped" or
|
|
589
|
+
.conclusion == "neutral")));
|
|
590
|
+
if (.workflow_runs | type) != "array" or
|
|
591
|
+
(.total_count | type) != "number" then
|
|
592
|
+
error("Invalid validation owner response")
|
|
593
|
+
elif .total_count != (.workflow_runs | length) then
|
|
594
|
+
error("Incomplete validation owner response")
|
|
595
|
+
elif any(.workflow_runs[]; valid_run | not) then
|
|
596
|
+
error("Invalid validation run identity or state")
|
|
597
|
+
else
|
|
598
|
+
[.workflow_runs[] | (.path | split("@")[0]) as $workflow | select(
|
|
599
|
+
.head_sha == $head and .head_branch == $branch and
|
|
600
|
+
.event == "pull_request" and .repository.full_name == $repo and
|
|
601
|
+
($workflow == ".github/workflows/validation.yml" or
|
|
602
|
+
$workflow == ".github/workflows/validation_self-ci.yml")
|
|
603
|
+
)] | sort_by(.id) | last |
|
|
604
|
+
if . == null then "absent"
|
|
605
|
+
elif active or (.status == "completed" and .conclusion == "success") then "owned"
|
|
606
|
+
elif .status == "completed" and
|
|
607
|
+
(.conclusion == "failure" or .conclusion == "timed_out" or
|
|
608
|
+
.conclusion == "action_required") then "failed"
|
|
609
|
+
elif .status == "completed" and
|
|
610
|
+
(.conclusion == "cancelled" or .conclusion == "skipped" or
|
|
611
|
+
.conclusion == "neutral") then "missing"
|
|
612
|
+
else error("Unconfirmed validation owner state") end
|
|
613
|
+
end' <<< "$runs")
|
|
614
|
+
fresh_state=$(gh pr view "$pr" --repo "$GITHUB_REPOSITORY" \
|
|
615
|
+
--json isDraft,headRefOid,headRefName \
|
|
616
|
+
--jq '[.isDraft, .headRefOid, .headRefName] | @tsv')
|
|
617
|
+
if [ "$fresh_state" != "$pr_state" ] || [ "$validation" != absent ] ||
|
|
618
|
+
[ "$owner_poll" -ge 7 ]; then
|
|
619
|
+
break
|
|
620
|
+
fi
|
|
621
|
+
echo "Release PR #$pr has no current-head validation yet (lookup $owner_poll of 7); waiting for its synchronize run to register."
|
|
622
|
+
owner_poll=$((owner_poll + 1))
|
|
623
|
+
sleep 5
|
|
624
|
+
done
|
|
625
|
+
if [ "$validation" = absent ]; then
|
|
626
|
+
validation=missing
|
|
627
|
+
fi
|
|
607
628
|
if [ "$fresh_state" != "$pr_state" ]; then
|
|
608
629
|
if [ "$state_attempt" -eq 3 ]; then
|
|
609
630
|
echo 'Release PR state did not stabilize during validation lookup; refusing readiness mutation.' >&2
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.53.8](https://github.com/0xPlayerOne/code-foundry/compare/v1.53.7...v1.53.8) (2026-10-31)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **release:** wait for the synchronize validation run before re-readying ([#829](https://github.com/0xPlayerOne/code-foundry/issues/829)) ([d0abbe2](https://github.com/0xPlayerOne/code-foundry/commit/d0abbe27349635bcc5bb63aafac3ff2e989f960f))
|
|
9
|
+
|
|
3
10
|
## [1.53.7](https://github.com/0xPlayerOne/code-foundry/compare/v1.53.6...v1.53.7) (2026-10-31)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -143,16 +150,9 @@
|
|
|
143
150
|
|
|
144
151
|
* safely categorize npm publication failures ([#787](https://github.com/0xPlayerOne/code-foundry/issues/787)) ([a4268af](https://github.com/0xPlayerOne/code-foundry/commit/a4268af5ce7cd0a32407420424419c0cad01dce8))
|
|
145
152
|
|
|
146
|
-
## [1.49.1](https://github.com/0xPlayerOne/code-foundry/compare/v1.49.0...v1.49.1) (2026-10-28)
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
### Bug Fixes
|
|
150
|
-
|
|
151
|
-
* handle empty security audit matrices ([#785](https://github.com/0xPlayerOne/code-foundry/issues/785)) ([02f0565](https://github.com/0xPlayerOne/code-foundry/commit/02f05652e68267a2aa2df5d5af8f13df9ba1e3aa))
|
|
152
|
-
|
|
153
153
|
<!-- code-foundry: packaged changelog -->
|
|
154
154
|
|
|
155
155
|
---
|
|
156
156
|
|
|
157
|
-
This packaged changelog lists the 20 most recent releases;
|
|
157
|
+
This packaged changelog lists the 20 most recent releases; 279 older releases are omitted to keep the package small.
|
|
158
158
|
See the [full changelog](https://github.com/0xPlayerOne/code-foundry/blob/main/CHANGELOG.md) for the complete history.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-foundry",
|
|
3
|
-
"version": "1.53.
|
|
3
|
+
"version": "1.53.8",
|
|
4
4
|
"description": "A fast, language-aware repository factory for agent-ready workflows, testing, security, and release automation.",
|
|
5
5
|
"homepage": "https://github.com/0xPlayerOne/code-foundry#readme",
|
|
6
6
|
"bugs": {
|