OpenClaw Tideclaw alpha/nightly release automation: isolated branches, local fixes, release CI, branch retention, and forward-port to main.
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-release-openclaw-nightly-ed1dba490a2b ,按照其中的说明把「release-openclaw-nightly」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Use for Tideclaw/OpenClaw alpha/nightly release automation, manual alpha triggers, beta prep, release-branch repair, and post-release forward-port. Load $release-private if it exists before using Tideclaw host paths, cron ids, or Discord routing ids.
main.main and prove main CI green.gh write wrapper below.origin/main does not create a backport audit by itself.For any backport discovery, pin the exact release baseline and source main SHA. Start from the last accepted audit cursor or, when none exists, their merge base. Enumerate every non-patch-equivalent source commit, reconcile authorized public and private advisories, and record the bounds, counts, filters, applicability results, decisions, exclusions, dependencies, and blocked items in the existing alpha state file.
Titles are signals, never gates. Classify the complete inventory, inspect every
security- or reliability-signalled production diff, and separately review
conventional fix, perf, and doctor commits in execution, authentication,
sandboxing, networking, persistence, delivery, gateway, configuration, plugin,
and major-channel paths. Mechanically try each such diff against a detached
baseline worktree and record whether it is clean, conflicted,
empty/already-covered, or failed. A clean patch is triage evidence, not an
automatic backport.
Also snapshot OpenClaw issues carrying maturity:stable at the pinned source
SHA and record the label query time with the audit bounds. Reconcile every
labelled issue, whether open or closed, whose fixing PR or commit actually
landed in the scan range with a commit-ledger decision, and give every open
P0/P1 labelled issue an explicit fixed, not-affected, maintainer-deferred, or
blocked release disposition. Treat the label only as a completeness and
priority signal: validate its review rationale, record feature, new
configuration or policy, docs/support, and lower-maturity matches as
label-drift, and never infer a fix, backport approval, or release blocker from
the label alone.
For every proposed item, inspect the complete change, baseline behavior, callers, callees, siblings, tests, dependency contracts, security impact, and publication surface. Collapse overlapping or dependent commits to the smallest final fix. Exclude features, migrations, new configuration or runtime requirements, and broad redesigns unless a maintainer explicitly approves them. Present the complete categorized set for approval before changing the candidate; then keep provenance in that state file, run focused proof and release validation, and dispatch npm preflight only after the canonical branch/tag has the exact final version and SHA.
Tideclaw should commit under its own machine identity on release branches and forward-port branches:
git config user.name "Tideclaw"
git config user.email "tideclaw@openclaw.ai"
This is good for auditability if commits are clearly machine-authored and gated by CI. Avoid direct pushes to protected main; forward-port via PR/automerge unless the repo policy explicitly allows the bot to push after green checks. Include human Co-authored-by only when a human supplied the patch or explicit commit text.
tideclaw/alpha/tideclaw/alpha/YYYY-MM-DD-HHMMZorigin/main SHA at trigger time.$release-private on the Tideclaw host.vYYYY.M.PATCH-alpha.NalphaPATCH is a sequential monthly release-train number, never the calendar day. Determine the alpha train from stable and beta releases; ignore alpha-only patch numbers when choosing the next train. Use one greater than the highest stable/beta patch for the month, then increment only alpha.N for repeated nightlies on that train. If a beta exists on that next patch, move alpha to the following train. Legacy alpha-only tags with inflated patch numbers do not advance beta/stable numbering.
Do not reuse old alpha branches for a new run. If rerunning the same base SHA, create a new timestamped branch and record why.
$release-private.git fetch origin main --tags --prune
git switch main
git merge --ff-only origin/main
BASE_SHA="$(git rev-parse origin/main)"
BRANCH="tideclaw/alpha/$(date -u +%Y-%m-%d-%H%MZ)"
git switch -c "$BRANCH" "$BASE_SHA"
AGENTS.mddocs/scripts/.github/workflows/*release*$BASE_SHA with the last successful alpha state and current git/npm/GitHub alpha tags. If already released, report skip and do not publish.Manual trigger:
CRON_ID="<from release-private>"
OPENCLAW_ALLOW_ROOT=1 openclaw cron run "$CRON_ID" --expect-final --timeout 21600000
Tideclaw may run alpha immediately from Discord when a maintainer mentions Tideclaw in #releases or #maintainers.
Accepted shapes:
@Tideclaw run alpha now
@Tideclaw alpha release from main now
@Tideclaw trigger alpha
Rules:
origin/main and create a fresh tideclaw/alpha/YYYY-MM-DD-HHMMZ branch.#maintainers trigger requires an explicit Tideclaw mention; do not react to unmentioned release chatter there.$release-private.Tideclaw may run beta releases from #releases or mentioned #maintainers commands only when a maintainer sends an explicit beta trigger. Treat this as human approval for beta, not for stable/latest.
Accepted shapes:
@Tideclaw beta release from vYYYY.M.PATCH-alpha.N
@Tideclaw beta release from tideclaw/alpha/YYYY-MM-DD-HHMMZ
@Tideclaw beta release from latest proven alpha
Rules:
beta release and a source alpha tag/branch, or latest proven alpha.#releases and stop.alpha package, release CI, recorded state file, and branch/tag SHA.tideclaw/beta/YYYY-MM-DD-HHMMZ from the proven alpha source, not directly from a moving main.vYYYY.M.PATCH-beta.N, matching npm --tag beta. Ignore alpha-only patch numbers when selecting the beta train.main using the same fixes-only PR rules below.Before running checks, mine recent Tideclaw alpha branches for fixes already made during previous release attempts:
$release-private for the last successful alpha branch and fix commit SHAs.git for-each-ref refs/remotes/origin/tideclaw/alpha --format='%(refname:short) %(committerdate:iso-strict)'
origin/main:git log --no-merges --reverse --format='%H%x09%s' origin/main..origin/tideclaw/alpha/YYYY-MM-DD-HHMMZ
fixCommitShas in the state file.Use git cherry, git range-diff, and targeted test reruns to avoid duplicating fixes already present on main.
Use the branch as a release-candidate repair surface:
Commit examples:
git add <files>
git commit -m "fix: stabilize alpha release preflight"
git push -u origin "$BRANCH"
After local proof:
vYYYY.M.PATCH-alpha.N from existing git tags, npm versions, and GitHub releases. Select PATCH from stable/beta trains, not the date or the highest alpha-only patch. Reuse the same alpha train and increment alpha.N until that patch has a beta; after a beta exists, use the following patch for new alpha builds.gh is a read-only Codex sandbox wrapper; use /usr/local/bin/gh-tideclaw-write for write-capable commands such as workflow run, run cancel, and publish dispatch:GH="/usr/local/bin/gh-tideclaw-write"
SHA="$(git rev-parse HEAD)"
TAG="v$(node -p "require('./package.json').version")"
BRANCH="$(git branch --show-current)"
PUBLICATION_SELECTION='{"route":"alpha","npmDistTag":"alpha","publishOpenclawNpm":true,"pluginPublishScope":"all-publishable","plugins":[]}'
FRV_ENVELOPE="$(jq -cn --arg ref "$BRANCH" --arg sha "$SHA" \
--argjson selection "$PUBLICATION_SELECTION" \
'{trustedWorkflow:{ref:$ref,fullRef:("refs/heads/"+$ref),sha:$sha},validationPurpose:"publish",publicationSelection:$selection}')"
"$GH" workflow run full-release-validation.yml --repo openclaw/openclaw --ref "$BRANCH" \
-f ref="$BRANCH" \
-f expected_sha="$SHA" \
-f trusted_workflow_json="$FRV_ENVELOPE" \
-f release_profile=beta \
-f rerun_group=all
"$GH" workflow run openclaw-npm-release.yml --repo openclaw/openclaw --ref "$BRANCH" \
-f tag="$SHA" \
-f preflight_only=true \
-f npm_dist_tag=alpha
gh run list, gh run view, and gh api. Read-only gh is fine for polling; use $GH only when a command mutates GitHub. Do not use Codex browser/fetch for GitHub API polling; prior Tideclaw runs failed there after successful preflight.install-smoke run cannot replace failed rerun_group=all publication evidence; complete and seal the required all-group validation before publishing.Plugin SDK API diff summary. If it reports
changes, download the
plugin-sdk-api-release-diff-<npm-preflight-run-id>-<run-attempt> artifact,
inspect the changed declarations, and set
PLUGIN_SDK_API_ACKNOWLEDGEMENT to the first 8 characters of its digest.
Otherwise set it to an empty string. Then create and push the release tag
from that exact commit:NPM_PREFLIGHT_RUN_ATTEMPT="$(gh api \
"repos/openclaw/openclaw/actions/runs/${NPM_PREFLIGHT_RUN_ID}" \
--jq .run_attempt)"
plugin_sdk_diff_dir="$(mktemp -d)"
gh run download "$NPM_PREFLIGHT_RUN_ID" --repo openclaw/openclaw \
--name "plugin-sdk-api-release-diff-${NPM_PREFLIGHT_RUN_ID}-${NPM_PREFLIGHT_RUN_ATTEMPT}" \
--dir "$plugin_sdk_diff_dir"
jq '{digest, entrypointsAdded, entrypointsRemoved, exports}' \
"$plugin_sdk_diff_dir/plugin-sdk-api-release-diff.json"
PLUGIN_SDK_API_ACKNOWLEDGEMENT=""
# After reviewing a nonempty diff, use its printed digest:
# PLUGIN_SDK_API_ACKNOWLEDGEMENT="$(jq -r '.digest[0:8]' \
# "$plugin_sdk_diff_dir/plugin-sdk-api-release-diff.json")"
git tag -a "$TAG" "$SHA" -m "openclaw ${TAG#v}"
git push origin "$TAG"
rm -rf "$plugin_sdk_diff_dir"
release-publish/* tooling tag, but alpha branch SHAs are not on main, so
ensureReleasePublishToolingTag cannot mint one for them. The parent's
approval receipt create also rejects tideclaw/alpha/* refs. Keep the
candidate and validation evidence, report this tooling blocker, and do not
widen the environment policy. The historical dispatch below records the
alpha inputs for recovery after that route is repaired; do not run it now:FULL_RELEASE_VALIDATION_RUN_ATTEMPT="$(gh api \
"repos/openclaw/openclaw/actions/runs/${FULL_RELEASE_VALIDATION_RUN_ID}" \
--jq .run_attempt)"
"$GH" workflow run openclaw-release-publish.yml --repo openclaw/openclaw --ref "$BRANCH" \
-f tag="$TAG" \
-f preflight_run_id="$NPM_PREFLIGHT_RUN_ID" \
-f full_release_validation_run_id="$FULL_RELEASE_VALIDATION_RUN_ID" \
-f full_release_validation_run_attempt="$FULL_RELEASE_VALIDATION_RUN_ATTEMPT" \
-f plugin_sdk_api_acknowledgement="$PLUGIN_SDK_API_ACKNOWLEDGEMENT" \
-f npm_dist_tag=alpha \
-f plugin_publish_scope=all-publishable \
-f publish_openclaw_npm=true \
-f release_profile=beta \
-f wait_for_clawhub=false
Important: openclaw-npm-release.yml with preflight_only=true only prepares artifacts. It does not publish. A successful alpha requires the later openclaw-release-publish.yml wrapper, a pushed git tag, npm alpha dist-tag proof, and a GitHub prerelease.
Release is not done until all are true:
npm view openclaw@<version> shows the exact version, dist-tag alpha, tarball, integrity, and publish time.$release-private records version, tag, base SHA, branch, fix commit SHAs, workflow run IDs, npm integrity, and timestamp.Final Discord summary in #releases:
Use Discord-safe Markdown links with angle-bracket targets. Never print secrets.
After a successful alpha, raise a fixes-only PR back to main:
origin/main:git fetch origin main --prune
git switch -c "tideclaw/forward-port/$(date -u +%Y-%m-%d-%H%MZ)" origin/main
If origin/main is independently red before the forward-port, document the unrelated failing check and still keep the forward-port PR green against its head when possible.
Before and after each run, prune old alpha branches:
origin/tideclaw/alpha/*.git push origin --delete tideclaw/alpha/YYYY-MM-DD-HHMMZ
Never delete human branches, beta branches, stable branches, or unknown prefixes.
Stop and report clearly if: