@kody-ade/kody-engine 0.4.155 → 0.4.156
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/bin/kody.js
CHANGED
|
@@ -1061,7 +1061,7 @@ var init_loadPriorArt = __esm({
|
|
|
1061
1061
|
// package.json
|
|
1062
1062
|
var package_default = {
|
|
1063
1063
|
name: "@kody-ade/kody-engine",
|
|
1064
|
-
version: "0.4.
|
|
1064
|
+
version: "0.4.156",
|
|
1065
1065
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
1066
1066
|
license: "MIT",
|
|
1067
1067
|
type: "module",
|
|
@@ -82,6 +82,18 @@ open_deploy_pr() {
|
|
|
82
82
|
local body
|
|
83
83
|
body=$(build_pr_body "$new_version" "$changelog_section" "$default_branch" "$release_branch" "$issue_arg")
|
|
84
84
|
|
|
85
|
+
# GitHub rejects a PR body over 65536 chars (GraphQL createPullRequest).
|
|
86
|
+
# A large accumulated CHANGELOG section can blow past it, so clamp: drop the
|
|
87
|
+
# changelog to a budget and rebuild, then hard-truncate as a final guard.
|
|
88
|
+
local body_max=65000
|
|
89
|
+
if (( ${#body} > body_max )); then
|
|
90
|
+
echo "[deploy] PR body ${#body} chars > ${body_max} — truncating changelog" >&2
|
|
91
|
+
local budget=$(( body_max - 2000 ))
|
|
92
|
+
changelog_section="${changelog_section:0:budget}"$'\n\n_…changelog truncated; see CHANGELOG.md on the branch._'
|
|
93
|
+
body=$(build_pr_body "$new_version" "$changelog_section" "$default_branch" "$release_branch" "$issue_arg")
|
|
94
|
+
(( ${#body} > body_max )) && body="${body:0:body_max}"
|
|
95
|
+
fi
|
|
96
|
+
|
|
85
97
|
# Idempotency: reuse an open PR for this branch pair if one exists.
|
|
86
98
|
local existing pr_url
|
|
87
99
|
existing=$(gh pr list --head "$default_branch" --base "$release_branch" --state open --json url --limit 1 2>/dev/null \
|
|
@@ -135,8 +135,22 @@ if [[ "$publish_status" == "failed" ]]; then
|
|
|
135
135
|
fi
|
|
136
136
|
|
|
137
137
|
# ── 5. Deploy PR (default → release branch) ───────────────────────────────
|
|
138
|
+
# Distinguish three outcomes: rc!=0 is a real failure (do NOT mask as no-op);
|
|
139
|
+
# rc==0 + empty URL is a genuine single-branch no-op; rc==0 + URL is success.
|
|
138
140
|
current_step="deploy"
|
|
139
|
-
|
|
141
|
+
set +e
|
|
142
|
+
deploy_pr_url=$(open_deploy_pr "$new_version" "$issue")
|
|
143
|
+
deploy_rc=$?
|
|
144
|
+
set -e
|
|
145
|
+
release_branch="${KODY_CFG_RELEASE_RELEASEBRANCH:-}"
|
|
146
|
+
if [[ "$deploy_rc" -ne 0 ]]; then
|
|
147
|
+
echo "[release] deploy step failed (rc=${deploy_rc}) — published v${new_version} but the ${default_branch}→${release_branch} promotion PR was not opened" >&2
|
|
148
|
+
echo "KODY_REASON=release v${new_version}: published, but the ${default_branch}→${release_branch} deploy PR failed"
|
|
149
|
+
echo "RELEASE_TAG=${tag}"
|
|
150
|
+
[[ -n "$release_url" ]] && echo "RELEASE_URL=${release_url}"
|
|
151
|
+
echo "RELEASE_FAILED=true"
|
|
152
|
+
exit 1
|
|
153
|
+
fi
|
|
140
154
|
if [[ -z "$deploy_pr_url" ]]; then
|
|
141
155
|
echo " (deploy: no-op — single-branch repo)"
|
|
142
156
|
else
|
|
@@ -142,6 +142,18 @@ if [[ "$issue_arg" =~ ^[0-9]+$ && "$issue_arg" != "0" ]]; then
|
|
|
142
142
|
fi
|
|
143
143
|
body=$(build_pr_body "$tracking_line")
|
|
144
144
|
|
|
145
|
+
# GitHub rejects a PR body over 65536 chars (GraphQL createPullRequest). A
|
|
146
|
+
# large accumulated CHANGELOG section can blow past it, so clamp: drop the
|
|
147
|
+
# changelog to a budget and rebuild, then hard-truncate as a final guard.
|
|
148
|
+
body_max=65000
|
|
149
|
+
if (( ${#body} > body_max )); then
|
|
150
|
+
echo "[kody release-deploy] PR body ${#body} chars > ${body_max} — truncating changelog" >&2
|
|
151
|
+
budget=$(( body_max - 2000 ))
|
|
152
|
+
changelog_section="${changelog_section:0:budget}"$'\n\n_…changelog truncated; see CHANGELOG.md on the branch._'
|
|
153
|
+
body=$(build_pr_body "$tracking_line")
|
|
154
|
+
(( ${#body} > body_max )) && body="${body:0:body_max}"
|
|
155
|
+
fi
|
|
156
|
+
|
|
145
157
|
if [[ -n "$existing" ]]; then
|
|
146
158
|
echo " reusing existing deploy PR: ${existing}"
|
|
147
159
|
pr_url="$existing"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.156",
|
|
4
4
|
"description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|