Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(release-cut): resume only the commit that introduced the version (#946)
Ruben Lütke9a8073761880
diff --git a/.github/workflows/release-cut.yml b/.github/workflows/release-cut.ymlindex 888ac9bc1e..1b006c393d 100644--- a/.github/workflows/release-cut.yml+++ b/.github/workflows/release-cut.yml@@ -49,7 +49,7 @@ on:required: falsedefault: ""resume_sha:- description: "Already merged and CI-qualified version commit to finish (optional full SHA)"+ description: "Already merged and CI-qualified commit that introduced the version, to finish (optional full SHA)"required: falsedefault: ""@@ -113,6 +113,16 @@ jobs:git checkout --detach "$RESUME_SHA"actual="$(python -c 'from scripts.ci.release_admit import versions; print(versions()[0])')"[ "$actual" = "$expected" ] || { echo "::error::Resume cannot select an older version."; exit 1; }+ # Only the commit that introduced the version may be tagged. A later+ # commit with the same version would ship changes that no CHANGELOG+ # section lists, and the next cut starts after the tag (#529).+ before="$(git show "$RESUME_SHA^:pyproject.toml" \+ | python -c 'import sys, tomllib; print(tomllib.loads(sys.stdin.read())["project"]["version"])')"+ if [ "$before" = "$actual" ]; then+ echo "::error::$RESUME_SHA does not introduce v$actual; resume the version commit instead:"+ git log --format='%H %s' -S"## [$actual]" "$RESUME_SHA" -- CHANGELOG.md+ exit 1+ fiecho "version=$actual" >> "$GITHUB_OUTPUT"- name: Bump version + CHANGELOGid: bumpdiff --git a/CHANGELOG.md b/CHANGELOG.mdindex 5c2407299c..47e4c6ccb8 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -296,6 +296,7 @@ If you installed before 3.2.0, run the installer once more (see the 3.2.0 notes)### Fixed- Never report a stopped event loop as stalled (#523)+- Follow the registry's GitHub Pages hosts to the Dodaios organization (#525)---diff --git a/docs/ci-pipeline.md b/docs/ci-pipeline.mdindex 652c880cfe..3d0c8042b0 100644--- a/docs/ci-pipeline.md+++ b/docs/ci-pipeline.md@@ -438,8 +438,11 @@ A release happens **only** when the maintainer asks for one.duplicate PyPI publication is dispatched. Without the bot(`RELEASE_APP_ID` unset) the job falls back to `GITHUB_TOKEN`, dispatchesthe publishers itself, and a maintainer must open the candidate PR, since- `GITHUB_TOKEN` may not open pull requests here. Resume support accepts an- already merged version commit.+ `GITHUB_TOKEN` may not open pull requests here. Resume (`resume_sha`)+ finishes an already merged version commit: the commit whose parent still+ has the previous version. A later commit with the same version is refused,+ and the run names the version commit, because tagging it would ship changes+ that no CHANGELOG section lists.* **`release-gate.yml`** is the first job of `release.yml` (PyPI),`desktop-installers.yml` and `sign-installer.yml`. It admits a tag onlywhen tag, versions and CHANGELOG agree, the commit is on main, anddiff --git a/tests/unit/ci/test_release_cut_workflow.py b/tests/unit/ci/test_release_cut_workflow.pyindex 42a1c599ac..58fbeaf47d 100644--- a/tests/unit/ci/test_release_cut_workflow.py+++ b/tests/unit/ci/test_release_cut_workflow.py@@ -22,6 +22,7 @@ git() {else printf '%s\n' "$TAG_SHA"; fi ;;merge-base) return "$ANCESTOR_EXIT" ;;show-ref) return "$TAG_EXISTS" ;;+ show) printf '[project]\n' ;;checkout) : > checked-out ;;esacreturn 0@@ -46,8 +47,12 @@ gh() {python() {printf 'python %s\n' "$*" >> "$TRACE_FILE"if [ "$1" = -c ]; then- if [ -f checked-out ]; then printf '%s\n' "$RESUME_VERSION";- else printf '%s\n' "$BASE_VERSION"; fi+ case "$2" in+ # The version in the resumed commit's parent, read from stdin.+ *stdin*) printf '%s\n' "$PARENT_VERSION" ;;+ *) if [ -f checked-out ]; then printf '%s\n' "$RESUME_VERSION";+ else printf '%s\n' "$BASE_VERSION"; fi ;;+ esacelse return "$ADMIT_EXIT"; fi}"""@@ -106,6 +111,7 @@ def _exercise("RESUME_SHA": _SHA,"BASE_VERSION": "1.2.3","RESUME_VERSION": "1.2.3",+ "PARENT_VERSION": "1.2.2","RELEASE_REF": "refs/tags/v1.2.3","TAG_EXISTS": "1","TAG_SHA": _SHA,@@ -289,6 +295,8 @@ def test_only_a_green_candidate_can_land_and_publish(tmp_path, overrides, succes({"RESUME_SHA": "refs/heads/unmerged"}, False),({"ANCESTOR_EXIT": "1"}, False),({"RESUME_VERSION": "1.2.2"}, False),+ # A later commit on top of the version commit keeps the version (#529).+ ({"PARENT_VERSION": "1.2.3"}, False),({"ADMIT_EXIT": "1"}, False),({"TAG_EXISTS": "0", "TAG_SHA": "2" * 40}, False),],@@ -312,3 +320,13 @@ def test_resume_requires_merged_current_version_and_admission(tmp_path, overrideelse:assert not any(command.startswith("git tag ") for command in commands)assert "git push origin v1.2.3" not in commands+++def test_resume_names_the_version_commit_when_given_a_later_one(tmp_path):+ result, commands = _exercise(+ tmp_path, ["Select an already merged version commit"], PARENT_VERSION="1.2.3"+ )+ assert result.returncode != 0+ assert "does not introduce v1.2.3" in result.stdout+ assert f"git log --format=%H %s -S## [1.2.3] {_SHA} -- CHANGELOG.md" in commands+ assert not (tmp_path / "outputs.txt").exists()