fix(ci): bump 5 channel versions + fix lifetime desync in panics check - #2300
Conversation
Version bumps for channels with source changes:
- discord 0.2.2 -> 0.2.3 (pairing message UX)
- feishu 0.1.4 -> 0.2.0 (pairing flow refactor + multi-tenancy)
- slack 0.2.2 -> 0.3.0 (broadcast feature implementation)
- telegram 0.2.6 -> 0.2.8 (webhook dedup + configurable polling)
- whatsapp 0.2.0 -> 0.2.2 (pairing message UX)
Fix check_no_panics.py: Rust lifetime annotations ('static, 'a) were
parsed as char literal openings, blanking the rest of the line including
any opening brace. This caused the brace-depth tracker to desync in
large test modules, producing false positives (e.g. server.rs:6378).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR addresses CI failures by (1) correcting the check_no_panics.py lexer so Rust lifetime annotations don’t desync brace tracking, and (2) bumping registry manifest versions for five WASM channel entries.
Changes:
- Fix
scripts/check_no_panics.pylifetime-vs-char-literal handling and add a regression test to prevent brace-depth desynchronization. - Bump
versionfields for 5 channel registry manifests (discord/feishu/slack/telegram/whatsapp).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/check_no_panics.py | Lexer fix for Rust lifetime annotations + new unit test to prevent brace-depth desync. |
| registry/channels/discord.json | Bumps channel manifest version. |
| registry/channels/feishu.json | Bumps channel manifest version. |
| registry/channels/slack.json | Bumps channel manifest version. |
| registry/channels/telegram.json | Bumps channel manifest version. |
| registry/channels/whatsapp.json | Bumps channel manifest version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "kind": "channel", | ||
| "version": "0.2.2", | ||
| "version": "0.2.3", | ||
| "wit_version": "0.3.0", |
There was a problem hiding this comment.
The manifest version was bumped, but the artifacts.wasm32-wasip2.url (and sha256) still points to a binary whose filename encodes the old version (0.2.2). This will cause installs-from-artifact to fetch the old binary while reporting/recording the new version. Update the artifact URL+sha256 to the 0.2.3 release artifact, or set the artifact URL/sha256 to null until the new artifact is published (so source-build/fallback is used).
| "kind": "channel", | ||
| "version": "0.1.4", | ||
| "version": "0.2.0", | ||
| "wit_version": "0.3.0", |
There was a problem hiding this comment.
The manifest version was bumped to 0.2.0, but the artifacts.wasm32-wasip2.url still references an asset with the old version (0.1.4). This can lead to installing the older binary while the registry/UI reports 0.2.0. Either update the artifact URL+sha256 to the 0.2.0 artifact, or null out the artifact URL/sha256 until the new artifact is available.
| "kind": "channel", | ||
| "version": "0.2.2", | ||
| "version": "0.3.0", | ||
| "wit_version": "0.3.0", |
There was a problem hiding this comment.
The manifest version is now 0.3.0, but the artifacts.wasm32-wasip2.url still points to channel-slack-0.2.2-.... This makes installs-from-artifact inconsistent (old binary, new reported version). Update the artifact URL+sha256 to the 0.3.0 artifact, or set URL/sha256 to null until the 0.3.0 artifact is published.
| "kind": "channel", | ||
| "version": "0.2.6", | ||
| "version": "0.2.8", | ||
| "wit_version": "0.3.0", |
There was a problem hiding this comment.
The manifest version was bumped to 0.2.8, but the artifacts.wasm32-wasip2.url still references an older asset (channel-telegram-0.2.5-...). That can install an older binary while reporting/recording 0.2.8. Please update the artifact URL+sha256 to the 0.2.8 artifact, or null out the artifact URL/sha256 until a matching artifact is available.
| "kind": "channel", | ||
| "version": "0.2.0", | ||
| "version": "0.2.2", | ||
| "wit_version": "0.3.0", |
There was a problem hiding this comment.
The manifest version is now 0.2.2, but the artifact URL still points to whatsapp-0.2.0-.... This can lead to downloading/installing an older binary while the system reports 0.2.2. Update the artifact URL+sha256 to the 0.2.2 artifact, or temporarily set URL/sha256 to null until the new artifact is published.
| # blanks the rest of the line, hiding braces and causing the | ||
| # brace-depth tracker to desync across the whole file. | ||
| if nxt and (nxt.isalpha() or nxt == "_"): | ||
| # Peek past the identifier to see if it's 'x' (char) or 'ident (lifetime). |
There was a problem hiding this comment.
Small typo in this comment: it reads "'ident (lifetime)" but is missing the closing quote after ident. Consider changing it to "'ident' (lifetime)" for clarity.
| # Peek past the identifier to see if it's 'x' (char) or 'ident (lifetime). | |
| # Peek past the identifier to see if it's 'x' (char) or 'ident' (lifetime). |
nearai#2300) Version bumps for channels with source changes: - discord 0.2.2 -> 0.2.3 (pairing message UX) - feishu 0.1.4 -> 0.2.0 (pairing flow refactor + multi-tenancy) - slack 0.2.2 -> 0.3.0 (broadcast feature implementation) - telegram 0.2.6 -> 0.2.8 (webhook dedup + configurable polling) - whatsapp 0.2.0 -> 0.2.2 (pairing message UX) Fix check_no_panics.py: Rust lifetime annotations ('static, 'a) were parsed as char literal openings, blanking the rest of the line including any opening brace. This caused the brace-depth tracker to desync in large test modules, producing false positives (e.g. server.rs:6378). Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
scripts/check_no_panics.pywhere Rust lifetime annotations ('static,'a) caused false positive panic violationsAddresses CI failures from #1893 (tracked in this comment).
Change Type
Linked Issue
Fixes CI failures from #1893
Version Bumps
on_broadcast())Panics Check Fix
Root cause: The
sanitize_line()lexer incheck_no_panics.pytreated Rust lifetime annotations ('static,'a) as char literal openings. This blanked the rest of the line — including any{— causing the brace-depth tracker to desync across the entire file. Inserver.rs(6500+ lines), themod testsblock at line 3829 appeared to "close" at line 4501 due to a missing{onfn set_env_var(key: &'static str), making lines 4502-6568 falsely classified as production code.Fix: Distinguish lifetimes from char literals by peeking past the identifier: if no closing
'follows, it's a lifetime (skip the apostrophe); if a closing'is found, it's a char literal (enter char mode as before).Regression test added:
test_lifetime_annotations_do_not_desync_bracesValidation
python3 scripts/check_no_panics.py --self-test— 5/5 tests passserver.rs:6378-6387andhttp_security.rs:253-275now correctly detected as test contextSecurity Impact
None
Database Impact
None
Blast Radius
Rollback Plan
Revert the commit.
Review track: A (CI/chore)
🤖 Generated with Claude Code