You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(release-bot): add the release bot runner and its container image - #2211
Adds the runner for the Open SaaS Release Agent (A-0236381470000002), the agent that will run the weekly IC OS release thread in Open Messaging #eng-release (Component 1 of the zero-touch release plan). It also adds the container image to run it on dm1-dre1.
This version is read-only. Each turn:
checks in with Open Agents, and skips the turn if the agent is paused or not linked;
reads the bot's mentions, if it has an Open Messaging role (it doesn't yet: the grant is pending in Open Team);
writes a dry-run note to the run journal, sends a heartbeat and schedules its next turn.
It cannot post, call the AI, propose or merge. Every canister method it may call is on ALLOWED_METHODS, and anything else is refused before dfx runs. Message text never goes into the journal, only ids and counts.
Changes
release-bot/release_bot.py: the runner. It calls the live canisters through dfx as the bot's own identity (release-bot). Canister IDs checked against the live suite on 2026-12-01.
release-bot/test_release_bot.py: 16 unit tests with a fake canister layer (allowed-methods guard, no message text in the journal, paused and not-linked agents, failed turns, setup refusing a key that isn't the release agent, secret redaction).
release-bot/BUILD.bazel: py_binary, py_test, and //release-bot:oci_image, published by the main workflow as ghcr.io/dfinity/dre/release-bot:<commit>.
MODULE.bazel, 3rdparty/BUILD.dfx.bazel: dfx 0.29.2, pinned by the checksum published with the release. It goes in its own image layer at /usr/local/bin/dfx, so code changes don't re-upload the ~100 MB binary.
Testing
bazel build //release-bot:dfx_layer //release-bot:release-bot and bazel test //release-bot:release_bot_test pass locally (macOS). The layer contains only usr/local/bin/dfx (mode 0755).
mypy --strict with the repo's mypy.ini is clean.
Not verified locally: the full Linux image (//release-bot:oci_image). CI builds it.
Deployment
The dm1-dre1 deployment is a separate PR in dfinity-ops/k8s (bases/apps/release-bot). It needs the image tag from this PR's merge commit and the bot's key as a SOPS secret, which a person adds. Once that file exists in k8s, a follow-up can add it to the image-bump list in .github/workflows/main.yaml.
The runner for the Open SaaS "Release Agent" (A-0236381470000002), which
will run the weekly IC OS release thread in Open Messaging #eng-release.
This version is read-only: each turn checks in with Open Agents, reads
the bot's mentions if it has an Open Messaging role, and writes a
dry-run note to its run journal. It cannot post, call the AI, propose or
merge; every canister method it may call is on an allowed list.
- release-bot/release_bot.py: the runner, calling the live canisters
through dfx as the bot's own identity.
- release-bot/test_release_bot.py: unit tests with a fake canister layer.
- //release-bot:oci_image: published as ghcr.io/dfinity/dre/release-bot,
with dfx 0.29.2 (pinned by checksum) in its own layer at
/usr/local/bin/dfx.
The dm1-dre1 deployment follows in dfinity-ops/k8s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved issues can drop mentions after journaling failures, expose partial secrets in stderr, ignore the configured dfx executable during setup, and terminate the runner or leave turns open after transient failures.
Adds a dry-run runner and container image for the Open SaaS Release Agent, laying the groundwork for automated weekly IC OS release threads without posting messages or calling AI.
Changes:
Adds setup, status, and scheduled turns with allowlisted canister calls and IDs-only mention summaries.
Adds unit tests for access checks, lifecycle behavior, identity validation, and secret redaction.
Packages the runner with a separately layered, checksum-pinned dfx binary and documents deployment requirements.
File
Description
release-bot/test_release_bot.py
Adds unit tests using fake canister responses.
release-bot/release_bot.py
Implements agent setup, status, and the dry-run loop.
release-bot/README.md
Documents commands, configuration, deployment, and limitations.
release-bot/BUILD.bazel
Defines Python targets and the container image with a separate dfx layer.
…ures
Addresses review feedback on #2211:
- Redact the secret from dfx's stderr before truncating it, so a cut
can't leave half of an invite or onboarding code in the error.
- Commit the mentions cursor only after the turn is journaled; on a
journaling failure, memory and disk keep the previous cursor.
- Handle failures anywhere in an iteration: back off 60s, doubling up to
15 minutes, instead of exiting, and always end a turn once begun.
- setup's dfx identity commands use RELEASE_BOT_DFX like the canister calls.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
A rejected journal append still commits the advanced mentions cursor, causing subsequent turns to skip unrecorded mentions instead of rolling back and backing off.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Prevent cursor advancement when journal append fails
release-bot/release_bot.py:292
If journalAppend returns {"ok": false, "message": "append refused"}, execution still reaches save_state() and commits the advanced mentions cursor even though the journal entry was rejected. Subsequent turns then skip those mentions. Check the reply's ok field and raise CallError inside this try on rejection so the existing rollback and backoff handle it.
Addresses review feedback on #2211: journalAppend answering {ok: false}
no longer commits the mentions cursor. The cursor is restored, the turn
is still ended, and the runner backs off like on any other failure.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The image supports arm64 but always packages the x86_64 dfx binary, so arm64 builds can produce images whose canister calls fail with executable-format errors.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Match the DFX binary architecture to the target image
release-bot/BUILD.bazel:70
Please constrain this image to x86_64 or select an architecture-matched dfx archive. //images:ubuntu_24_04 explicitly supports Linux arm64 and selects an arm64 image configuration (images/BUILD.bazel:153–156), but :dfx_layer always contains the x86_64 binary from @dfx_linux. An arm64 build can therefore produce an image whose canister calls all fail with an executable-format error.
…cture
Addresses review feedback on #2211: //images:ubuntu_24_04 builds for
amd64 and arm64, but the dfx layer always held the x86_64 binary. Pin
dfx 0.29.2 for both Linux architectures (checksums from the release's
.sha256 files) and select the one matching the target CPU.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human review is needed to assess the risk of permanently skipped mentions at pagination boundaries and silently ignored heartbeat and end-turn refusals.
Addresses review feedback on #2211:
- Open Messaging's listMentions returns only the newest mentions after the
cursor, one page at most, and cannot page back. When a page comes back
full, the journal now says older mentions may not have been listed,
instead of moving the cursor past them silently.
- A refused heartbeat or end-turn ({ok: false}) is now logged instead of
ignored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Maintainer validation is needed because private canister interfaces are unavailable, fake-only tests cannot establish live contract compatibility, and the complete Linux image remains unvalidated.
No open issues 🎉
Review effort: Balanced
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the runner for the Open SaaS Release Agent (
A-0236381470000002), the agent that will run the weekly IC OS release thread in Open Messaging#eng-release(Component 1 of the zero-touch release plan). It also adds the container image to run it ondm1-dre1.This version is read-only. Each turn:
It cannot post, call the AI, propose or merge. Every canister method it may call is on
ALLOWED_METHODS, and anything else is refused beforedfxruns. Message text never goes into the journal, only ids and counts.Changes
release-bot/release_bot.py: the runner. It calls the live canisters throughdfxas the bot's own identity (release-bot). Canister IDs checked against the live suite on 2026-12-01.release-bot/test_release_bot.py: 16 unit tests with a fake canister layer (allowed-methods guard, no message text in the journal, paused and not-linked agents, failed turns,setuprefusing a key that isn't the release agent, secret redaction).release-bot/BUILD.bazel:py_binary,py_test, and//release-bot:oci_image, published by the main workflow asghcr.io/dfinity/dre/release-bot:<commit>.MODULE.bazel,3rdparty/BUILD.dfx.bazel: dfx 0.29.2, pinned by the checksum published with the release. It goes in its own image layer at/usr/local/bin/dfx, so code changes don't re-upload the ~100 MB binary.Testing
bazel build //release-bot:dfx_layer //release-bot:release-botandbazel test //release-bot:release_bot_testpass locally (macOS). The layer contains onlyusr/local/bin/dfx(mode 0755).mypy --strictwith the repo'smypy.iniis clean.//release-bot:oci_image). CI builds it.Deployment
The
dm1-dre1deployment is a separate PR indfinity-ops/k8s(bases/apps/release-bot). It needs the image tag from this PR's merge commit and the bot's key as a SOPS secret, which a person adds. Once that file exists in k8s, a follow-up can add it to the image-bump list in.github/workflows/main.yaml.🤖 Generated with Claude Code