Skip to content

release: announce each new version in the OpenIPC Telegram channel (#34) - #38

Merged
compot-dev merged 3 commits into
masterfrom
ci/telegram
Oct 17, 2026
Merged

compot-dev merged 3 commits into
masterfrom
ci/telegram

Conversation

@compot-dev

Copy link
Copy Markdown
Collaborator

Closes #34.

  • ci.yml, job release: announce=true is set only when the version in the title of the current latest differs from CERBERUS_VERSION — a re-publication of the same version (to complete missing files, Release: one release "latest" titled "Cerberus <version>", published on a version bump #32) is not announced. A new Telegram step then sends sendMessage to the OpenIPC dev channel (organization secrets TELEGRAM_TOKEN_BOT_OPENIPC, TELEGRAM_CHANNEL_OPENIPC_DEV, available to this repository): Cerberus <version>, the commit, the time, the version's CHANGELOG.md section (first 15 lines), the install command and releases/latest. No binary is attached. Missing secrets or a failed post give a warning; the release stays.
  • READMEs (all three): one line in "Releases" that new versions are announced in the OpenIPC Telegram channels.

Tested in compot/cross with curl stubbed (nothing sent): without secrets a warning and exit 0; with them the 0.3.1 message holds its CHANGELOG.md section and the install command. Workflow and docs only: no version bump, so merging posts nothing (0.3.1 is already in latest).

The release job sets announce=true only when the version in the title
of the current latest differs (not when it publishes the same version
again to complete missing files); a Telegram step then sends a message
(sendMessage, no file): version, commit, time, the CHANGELOG.md section
of the version, the install command and the release link. Organization
secrets; missing secrets or a failed post are a warning.

READMEs: new versions are announced in the OpenIPC Telegram channels.

Tested with curl stubbed (nothing sent): without secrets a warning and
exit 0; with them the 0.3.1 message holds its CHANGELOG section and the
install command.

Closes #34
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Announce new Cerberus releases in the OpenIPC Telegram channel

✨ Enhancement 📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Announce newly published versions in Telegram with release details, changelog highlights, and
 installation links.
• Skip announcements when republishing the same version; treat missing secrets or posting failures
 as warnings.
• Document release announcements in the English, Russian, and Chinese READMEs.
Diagram

graph TD
  Version["Version check"] --> Compare{"Version changed?"} -->|new or incomplete| Publish["Publish release"] --> Latest["Latest release"]
  Publish -->|new version only| Telegram["Telegram step"] --> Channel["OpenIPC channel"]
  Changelog["Changelog section"] --> Telegram
Loading
High-Level Assessment

Keep the announcement in the existing release job. Its version comparison already distinguishes new versions from same-version repairs, while placing the post after publication avoids announcing a release that failed to publish. A separate release-event workflow would need to reconstruct that distinction.

Files changed (4) +31 / -0

Enhancement (1) +25 / -0
ci.ymlPost new-version release announcements to Telegram +25/-0

Post new-version release announcements to Telegram

• Sets an announcement output only when CERBERUS_VERSION differs from the current latest release title, excluding same-version repairs. After publication, sends version, commit, time, changelog highlights, installation command, and release link to the OpenIPC dev channel; missing secrets and HTTP failures produce warnings rather than failing the release.

.github/workflows/ci.yml

Documentation (3) +6 / -0
README.mdMention Telegram announcements in English release docs +2/-0

Mention Telegram announcements in English release docs

• Adds a link to the OpenIPC Telegram channels and notes that new versions are announced there.

README.md

README.ru.mdMention Telegram announcements in Russian release docs +2/-0

Mention Telegram announcements in Russian release docs

• Adds the Russian-language announcement note and OpenIPC channels link.

README.ru.md

README.zh-CN.mdMention Telegram announcements in Chinese release docs +2/-0

Mention Telegram announcements in Chinese release docs

• Adds the Chinese-language announcement note and OpenIPC channels link.

README.zh-CN.md

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (2) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Test releases reach the Telegram channel 📎 Requirement gap ≡ Correctness
Description
The release gate sets announce=true for every version whose title differs from the previous latest
release, without checking whether VER is a stable release. A test pre-release that reaches the
release job is therefore posted to the OpenIPC channel instead of being limited to stable versions.
Code

.github/workflows/ci.yml[R143-145]

     if [ "$prev" != "Cerberus $ver" ]; then
       echo "new=true" >> "$GITHUB_OUTPUT"
+            echo "announce=true" >> "$GITHUB_OUTPUT"   # a new version: Telegram (#34)
Evidence
The changed condition marks every title change for announcement, while the release job only extracts
CERBERUS_VERSION and does not apply a stable-version check before setting the output.

Announce each new stable version on Telegram
.github/workflows/ci.yml[130-145]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The Telegram announcement flag is enabled whenever the release title changes, but the workflow does not exclude test pre-release versions.
## Fix Focus Areas
- .github/workflows/ci.yml[143-145]
- .github/workflows/ci.yml[205-206]
## Recommended Fix
Validate `ver` as a stable release version before writing `announce=true`, or add an equivalent condition to the Telegram step so test pre-releases are published without being announced.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. The release history omits Telegram announcements 📎 Requirement gap ⚙ Maintainability
Description
The PR adds Telegram delivery and README notices but does not add a corresponding entry to
CHANGELOG.md. The next release's history therefore does not record this release-process change for
users or maintainers reviewing the change log.
Code

.github/workflows/ci.yml[R203-205]

+      # A new version (not a re-publication of the same one) goes to the OpenIPC Telegram dev
+      # channel (#34). Organization secrets; a failed post is a warning, not a failed release.
+      - name: Telegram
Evidence
The PR introduces the Telegram release behavior and documents it in the workflow, but the current
changelog's latest section contains no entry for this change.

Document the single-release workflow
.github/workflows/ci.yml[203-225]
CHANGELOG.md[1-18]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new Telegram announcement workflow is not recorded in `CHANGELOG.md`, although the release documentation requirements require the change to be documented there.
## Fix Focus Areas
- .github/workflows/ci.yml[203-205]
- CHANGELOG.md[1-18]
## Recommended Fix
Add a changelog bullet or section describing that new stable versions are announced in the OpenIPC Telegram channels, including the relevant release or pull request reference.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. Long release notes prevent announcements ✓ Resolved
Description
text includes up to 15 changelog lines without limiting their length before it is sent to
Telegram. A valid changelog section with long lines can exceed Telegram’s 4096-character message
limit, causing the post to fail even though the release was published.
Code

.github/workflows/ci.yml[R220-221]

+          text=$(printf 'Cerberus %s\nCommit: %s\nTime: %s\n\n%s\n\nInstall: curl -fsSL %s/releases/latest/download/install.sh | sh -s -- <token>\n%s/releases/latest' \
+            "$VER" "${GITHUB_SHA::7}" "$(date -u '+%Y-%m-%d %H:%M:%S UTC')" "$changes" "$url" "$url")
Evidence
The new step limits the excerpt by line count, then sends the entire constructed text without a
character limit. The version check requires a changelog heading but places no limit on the section
body, so a release can pass that check with an overlong message.

.github/workflows/ci.yml[218-224]
.github/check-version.sh[57-65]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The 15-line changelog excerpt can still make the complete Telegram message exceed the sendMessage text limit.
## Fix Focus Areas
- .github/workflows/ci.yml[218-224]
## Recommended Fix
Reserve space for the fixed version, commit, time, install command, and release link; truncate the changelog excerpt to fit within Telegram’s message limit before calling sendMessage.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. A failed announcement cannot be retried 🐞 Bug ☼ Reliability
Description
announce is set only when the previous release title differs, while missing secrets and failed
Telegram posts are treated as successful steps. Once publication has updated the title and assets,
rerunning the workflow leaves announce unset and skips Telegram, even if the secrets or posting
failure have been fixed.
Code

.github/workflows/ci.yml[145]

+            echo "announce=true" >> "$GITHUB_OUTPUT"   # a new version: Telegram (#34)
Evidence
Publication updates or creates the release before the Telegram step runs. Both Telegram failure
paths leave the step successful; on a later run, a matching title and complete asset list set
neither new nor announce, so the Telegram condition is false.

.github/workflows/ci.yml[142-154]
.github/workflows/ci.yml[178-206]
.github/workflows/ci.yml[212-225]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A warning-only Telegram failure leaves no retry path: subsequent runs see a complete release with a matching title and skip the announcement.
## Fix Focus Areas
- .github/workflows/ci.yml[143-154]
- .github/workflows/ci.yml[205-225]
## Recommended Fix
Track whether the current version was successfully announced separately from the release title. Allow a rerun or manual run to send an announcement that has not succeeded, while keeping publication and Telegram posting independent.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Long release notes can fail the job ✓ Resolved
Description
changes=$(awk ... | sed ... | head -n 15) lets head close the pipe while an upstream process is
still writing, which can make the pipeline fail under the step's Bash pipefail setting. When a
future changelog section is sufficiently long, the Telegram step exits before posting and marks the
release job failed after publication has already completed.
Code

.github/workflows/ci.yml[R217-218]

+          changes=$(awk -v h="## ${VER} — " 'index($0, h) == 1 {f = 1; next} /^## / && f {exit} f' \
+            CHANGELOG.md | sed '/./,$!d' | head -n 15)
Evidence
The new pipeline limits only its consumer with head; the version check requires a changelog
heading but imposes no section-length limit. The Telegram step has no failure continuation, and it
runs after the Publish step.

.github/workflows/ci.yml[178-225]
.github/check-version.sh[50-66]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
For a sufficiently long changelog section, `head` can terminate an upstream writer with SIGPIPE. Under the step's Bash `pipefail` setting, that fails the release job after publication.
## Fix Focus Areas
- .github/workflows/ci.yml[216-219]
## Recommended Fix
Make the changelog extractor stop producing output after 15 lines, for example by handling heading selection, leading blank lines, and the line limit in one `awk` program instead of piping unbounded output to `head`. Ensure extraction errors remain warning-only if that is the intended Telegram failure policy.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can see how risky a PR is at a glance with blast radius labels

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread .github/workflows/ci.yml
Comment on lines 143 to +145
if [ "$prev" != "Cerberus $ver" ]; then
echo "new=true" >> "$GITHUB_OUTPUT"
echo "announce=true" >> "$GITHUB_OUTPUT" # a new version: Telegram (#34)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Test releases reach the telegram channel 📎 Requirement gap ≡ Correctness

The release gate sets announce=true for every version whose title differs from the previous latest
release, without checking whether VER is a stable release. A test pre-release that reaches the
release job is therefore posted to the OpenIPC channel instead of being limited to stable versions.
Agent Prompt
## Issue description
The Telegram announcement flag is enabled whenever the release title changes, but the workflow does not exclude test pre-release versions.

## Fix Focus Areas
- .github/workflows/ci.yml[143-145]
- .github/workflows/ci.yml[205-206]

## Recommended Fix
Validate `ver` as a stable release version before writing `announce=true`, or add an equivalent condition to the Telegram step so test pre-releases are published without being announced.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread .github/workflows/ci.yml
Comment on lines +203 to +205
# A new version (not a re-publication of the same one) goes to the OpenIPC Telegram dev
# channel (#34). Organization secrets; a failed post is a warning, not a failed release.
- name: Telegram

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. The release history omits telegram announcements 📎 Requirement gap ⚙ Maintainability

The PR adds Telegram delivery and README notices but does not add a corresponding entry to
CHANGELOG.md. The next release's history therefore does not record this release-process change for
users or maintainers reviewing the change log.
Agent Prompt
## Issue description
The new Telegram announcement workflow is not recorded in `CHANGELOG.md`, although the release documentation requirements require the change to be documented there.

## Fix Focus Areas
- .github/workflows/ci.yml[203-205]
- CHANGELOG.md[1-18]

## Recommended Fix
Add a changelog bullet or section describing that new stable versions are announced in the OpenIPC Telegram channels, including the relevant release or pull request reference.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread .github/workflows/ci.yml
echo "ver=$ver" >> "$GITHUB_OUTPUT"
if [ "$prev" != "Cerberus $ver" ]; then
echo "new=true" >> "$GITHUB_OUTPUT"
echo "announce=true" >> "$GITHUB_OUTPUT" # a new version: Telegram (#34)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

3. A failed announcement cannot be retried 🐞 Bug ☼ Reliability

announce is set only when the previous release title differs, while missing secrets and failed
Telegram posts are treated as successful steps. Once publication has updated the title and assets,
rerunning the workflow leaves announce unset and skips Telegram, even if the secrets or posting
failure have been fixed.
Agent Prompt
## Issue description
A warning-only Telegram failure leaves no retry path: subsequent runs see a complete release with a matching title and skip the announcement.

## Fix Focus Areas
- .github/workflows/ci.yml[143-154]
- .github/workflows/ci.yml[205-225]

## Recommended Fix
Track whether the current version was successfully announced separately from the release title. Allow a rerun or manual run to send an announcement that has not succeeded, while keeping publication and Telegram posting independent.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread .github/workflows/ci.yml Outdated
@keyldev

keyldev commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

LGTM, merging once the tests are green & code review fixed. The first real post happens on 0.3.2, so please check the channel then.

Qodo on #38: awk | sed | head -n 15 under the step's pipefail could fail
when head closes the pipe on a long section. One awk now skips the
leading blank lines and stops after 15.

Tested: a 3000-line section under bash -eo pipefail gives the first 15
lines and exit 0.

Refs #34
@compot-dev

Copy link
Copy Markdown
Collaborator Author

Qodo findings:

  • 4. Long release notes can fail the job: fixed in 9843ab5 — one awk skips the leading blank lines and stops after 15, no pipe (tested: a 3000-line section under bash -eo pipefail gives the first 15 lines, exit 0).
  • 1. Test releases reach the Telegram channel: the release job runs only for master, and CERBERUS_VERSION there is always a stable MAJOR.MINOR.PATCH (the version check rejects anything else); test builds are pre-releases made by hand from CI artifacts and never pass through this job.
  • 2. The release history omits Telegram announcements: this PR changes only the workflow and docs, so it has no version and no CHANGELOG.md section of its own; the next version's section records it.
  • 3. A failed announcement cannot be retried: not adopted, as in release: announce each new version in the OpenIPC Telegram channel (#43) vectis#47 — a retry needs a record of announcements outside the release; a missed post costs one announcement and the warning is in the run.

@compot-dev

Copy link
Copy Markdown
Collaborator Author

/review

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Qodo findings:

  • 4. Long release notes can fail the job: fixed in 9843ab5 — one awk skips the leading blank lines and stops after 15, no pipe (tested: a 3000-line section under bash -eo pipefail gives the first 15 lines, exit 0).
  • 1. Test releases reach the Telegram channel: the release job runs only for master, and CERBERUS_VERSION there is always a stable MAJOR.MINOR.PATCH (the version check rejects anything else); test builds are pre-releases made by hand from CI artifacts and never pass through this job.
  • 2. The release history omits Telegram announcements: this PR changes only the workflow and docs, so it has no version and no CHANGELOG.md section of its own; the next version's section records it.
  • 3. A failed announcement cannot be retried: not adopted, as in release: announce each new version in the OpenIPC Telegram channel (#43) vectis#47 — a retry needs a record of announcements outside the release; a missed post costs one announcement and the warning is in the run.

Thanks for the clarification.

  • Finding 4: The awk-only extractor in 9843ab5 addresses the pipefail/head failure mode. It can be considered fixed, pending the updated review reflecting that commit.
  • Finding 1: Your workflow constraints make the reported pre-release path inapplicable: the release job runs only on master, and CERBERUS_VERSION is validated as MAJOR.MINOR.PATCH. This is a valid rationale for closing the finding as not applicable.
  • Finding 2: Recording the workflow change in the next version’s changelog section is reasonable because this PR does not create a release version or changelog section.
  • Finding 3: The missed-announcement tradeoff is explicit and consistent with the cited precedent, though it remains an operational limitation rather than a code defect.

I can’t change finding statuses from this response; the PR author can dismiss the findings that are intentionally out of scope or not applicable.

Comment thread .github/workflows/ci.yml
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 9843ab5

Qodo on #38: 15 long CHANGELOG lines could exceed Telegram's
4096-character message limit. The excerpt is cut at 3000 characters.

Refs #34
@compot-dev

Copy link
Copy Markdown
Collaborator Author

Qodo finding 3 (long release notes prevent announcements): fixed in 3659a0f, the excerpt is cut at 3000 characters, so with the header, the install command and the link the message stays below Telegram's 4096. Findings 1, 2 and 4: unchanged, see the reply above.

@compot-dev

Copy link
Copy Markdown
Collaborator Author

/review

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Qodo finding 3 (long release notes prevent announcements): fixed in 3659a0f, the excerpt is cut at 3000 characters, so with the header, the install command and the link the message stays below Telegram's 4096. Findings 1, 2 and 4: unchanged, see the reply above.

Thanks for the update. The fix in 3659a0f addresses finding 3 by limiting the changelog excerpt to 3,000 characters, keeping the complete Telegram message within the 4,096-character limit. Findings 1, 2, and 4 remain unchanged and open.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 3659a0f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release: post each new version to Telegram

2 participants