Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion registry/channels/discord.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "discord",
"display_name": "Discord Channel",
"kind": "channel",
"version": "0.2.2",
"version": "0.2.3",
"wit_version": "0.3.0",
Comment on lines 4 to 6

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
"description": "Talk to your agent in Discord",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion registry/channels/feishu.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "feishu",
"display_name": "Feishu / Lark Channel",
"kind": "channel",
"version": "0.1.4",
"version": "0.2.0",
"wit_version": "0.3.0",
Comment on lines 4 to 6

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
"description": "Talk to your agent through a Feishu or Lark bot",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion registry/channels/slack.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "slack",
"display_name": "Slack Channel",
"kind": "channel",
"version": "0.2.2",
"version": "0.3.0",
"wit_version": "0.3.0",
Comment on lines 4 to 6

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
"description": "Talk to your agent in Slack",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion registry/channels/telegram.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "telegram",
"display_name": "Telegram Channel",
"kind": "channel",
"version": "0.2.6",
"version": "0.2.8",
"wit_version": "0.3.0",
Comment on lines 4 to 6

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
"description": "Talk to your agent through a Telegram bot",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion registry/channels/whatsapp.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "whatsapp",
"display_name": "WhatsApp Channel",
"kind": "channel",
"version": "0.2.0",
"version": "0.2.2",
"wit_version": "0.3.0",
Comment on lines 4 to 6

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
"description": "Talk to your agent through WhatsApp",
"keywords": [
Expand Down
49 changes: 46 additions & 3 deletions scripts/check_no_panics.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,25 @@ def sanitize_line(line: str, state: LexerState) -> str:
i += 1
continue
if ch == "'":
# This can misclassify lifetimes like `'a` as char literals. That only
# risks false negatives by masking later code on the same line.
state.in_char = True
# Distinguish char literals ('x', '\n') from lifetime annotations
# ('a, 'static). Lifetimes are an apostrophe followed by an ASCII
# letter or underscore and then a non-apostrophe (identifiers, not
# closing-quote). Misclassifying a lifetime as a char literal
# 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).

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
# 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).

Copilot uses AI. Check for mistakes.
j = i + 2
while j < len(chars) and (chars[j].isalnum() or chars[j] == "_"):
j += 1
if j < len(chars) and chars[j] == "'":
# Closing quote found -> char literal like 'a' or 'ab' (invalid but safe to skip).
state.in_char = True
else:
# No closing quote -> lifetime annotation; skip the apostrophe.
out[i] = " "
else:
state.in_char = True
i += 1
continue

Expand Down Expand Up @@ -347,6 +363,33 @@ def test_proc_macro_test_attrs_mark_body_only(self) -> None:
self.assertFalse(contexts[4])
self.assertFalse(contexts[5])

def test_lifetime_annotations_do_not_desync_braces(self) -> None:
"""Lifetime annotations ('a, 'static) must not be parsed as char literals.

If they are, the sanitizer blanks the rest of the line — including any
opening brace — and the brace-depth tracker desyncs. This caused
false positives in large test modules (e.g. server.rs).
"""
lines = [
"#[cfg(test)]\n",
"mod tests {\n",
" fn set_env_var(key: &'static str) -> Guard {\n",
" let original = std::env::var(key).ok();\n",
" Guard { key, original }\n",
" }\n",
" fn later_helper() {\n",
' value.expect("should be test context");\n',
" }\n",
"}\n",
]

contexts = line_test_contexts(lines)

# All lines inside mod tests must be test context, even after
# a function signature containing a lifetime annotation.
self.assertTrue(contexts[2], "fn with 'static should be test context")
self.assertTrue(contexts[7], "later helper should still be test context")

def test_named_tests_module_marks_context(self) -> None:
lines = [
"mod tests {\n",
Expand Down
Loading