Conversation
Greptile SummaryThis PR bundles the targeted WSL2 Ollama fix (disabling However, the PR removes several sender-authorization gates across three different extensions without explaining the rationale, which introduces meaningful regressions:
Additionally, Confidence Score: 2/5Not safe to merge: the PR bundles a clean WSL2 fix with several unexamined access-control removals across Telegram, Matrix, and MSTeams that create sender-authorization regressions. The WSL2/undici fix and improved error-cause logging are correct and well-tested. However, three separate authorization guards (Telegram DM callbacks, Matrix verification notices, MSTeams feedback invokes) were silently removed with no justification, and deleted tests confirm the regressions are real. A freshest-session promotion regression in session-utils and two stray editor files compound the concern. The PR title does not reflect the breadth of changes. extensions/telegram/src/bot-handlers.runtime.ts, extensions/matrix/src/matrix/monitor/verification-events.ts, extensions/msteams/src/monitor-handler.ts, src/gateway/session-utils.ts
|
| Filename | Overview |
|---|---|
| src/infra/net/undici-global-dispatcher.ts | Clean WSL2 fix: imports isWSL2Sync and returns false from resolveAutoSelectFamily() when the system default is true on WSL2, forcing IPv4-only connections. |
| src/agents/ollama-stream.ts | Improved error diagnostics: unwraps err.cause for undici fetch failures, appending the real network error to the error message and logging it. |
| src/agents/models-config.providers.discovery.ts | Appends err.cause.message to the Ollama discovery failure log so the underlying network error is surfaced alongside the outer error string. |
| extensions/telegram/src/bot-handlers.runtime.ts | Removes !isGroup from the authorizationMode condition, creating a regression where unpaired DM users can interact with inline buttons regardless of dmPolicy. |
| extensions/matrix/src/matrix/monitor/verification-events.ts | Removes isVerificationNoticeAuthorized and all call sites, eliminating DM policy/allowlist/pairing gating on Matrix verification notices. |
| extensions/msteams/src/monitor-handler.ts | Removes isFeedbackInvokeAuthorized guard from handleFeedbackInvoke, allowing feedback invokes to be processed regardless of DM or group allowlist policy. |
| src/gateway/session-utils.ts | Simplifies migrateAndPruneGatewaySessionStoreKey but removes freshest-wins logic, potentially promoting stale session entries when case-variant duplicates exist. |
Comments Outside Diff (2)
-
src/gateway/session-utils.ts, line 1823-1829 (link)Freshest-session promotion logic removed
migrateAndPruneGatewaySessionStoreKeypreviously selected the entry with the highestupdatedAtacross all case-variant duplicates and promoted it to the canonical key — ensuring the most recent session survived migration. The new code only copies any matching entry when the canonical key is absent.If a user has both a stale and a fresh case-variant entry, the new code may promote the stale one depending on
storeKeysordering, causing the user to lose their most recent session state on startup. The two deleted tests validated that the freshest entry always wins.Prompt To Fix With AI
This is a comment left during a code review. Path: src/gateway/session-utils.ts Line: 1823-1829 Comment: **Freshest-session promotion logic removed** `migrateAndPruneGatewaySessionStoreKey` previously selected the entry with the highest `updatedAt` across all case-variant duplicates and promoted it to the canonical key — ensuring the most recent session survived migration. The new code only copies any matching entry when the canonical key is absent. If a user has both a stale and a fresh case-variant entry, the new code may promote the stale one depending on `storeKeys` ordering, causing the user to lose their most recent session state on startup. The two deleted tests validated that the freshest entry always wins. How can I resolve this? If you propose a fix, please make it concise.
-
.vscode/settings.json, line 10-19 (link)User-specific VS Code settings committed to shared repo
The added
chat.agentSkillsLocationsblock contains user-machine-specific paths (~/.copilot/skills,~/.agents/skills,~/.claude/skills) and a hard-coded extension version (~/.vscode-server/extensions/synapsevscode.synapse-1.21.0/copilot/skills). Committing these to.vscode/settings.jsonwill push personal tool configurations to every contributor who pulls this branch.Entries that are developer-specific should live in
.vscode/settings.json.local(gitignored) or in VS Code's user settings, not in the project-level settings file.Prompt To Fix With AI
This is a comment left during a code review. Path: .vscode/settings.json Line: 10-19 Comment: **User-specific VS Code settings committed to shared repo** The added `chat.agentSkillsLocations` block contains user-machine-specific paths (`~/.copilot/skills`, `~/.agents/skills`, `~/.claude/skills`) and a hard-coded extension version (`~/.vscode-server/extensions/synapsevscode.synapse-1.21.0/copilot/skills`). Committing these to `.vscode/settings.json` will push personal tool configurations to every contributor who pulls this branch. Entries that are developer-specific should live in `.vscode/settings.json.local` (gitignored) or in VS Code's user settings, not in the project-level settings file. How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/telegram/src/bot-handlers.runtime.ts
Line: 1245-1248
Comment:
**DM callback authorization no longer enforced**
The `!isGroup` branch was removed from the `authorizationMode` condition. Before this change, DM callbacks _always_ selected `"callback-allowlist"` mode, which enforces the sender authorization gate (the now-removed comment explicitly said: _"DM callbacks must enforce the same sender authorization gate as normal DM commands"_).
With the new condition:
```typescript
const authorizationMode: TelegramEventAuthorizationMode =
!execApprovalButtonsEnabled && inlineButtonsScope === "allowlist"
? "callback-allowlist"
: "callback-scope";
```
DM callbacks will use `"callback-scope"` whenever `inlineButtonsScope` is not `"allowlist"` (e.g., `"dm"`), regardless of whether the sender is paired. This means an unpaired DM user can interact with inline buttons (e.g., trigger model selection) even when `dmPolicy: "pairing"` is configured — because `"callback-scope"` does not enforce the pairing/allowlist gate.
The deleted test `"blocks DM model-selection callbacks for unpaired users when inline buttons are DM-scoped"` covered exactly this scenario and confirmed the regression.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: extensions/matrix/src/matrix/monitor/verification-events.ts
Line: 309
Comment:
**Matrix verification sender authorization removed**
The `isVerificationNoticeAuthorized` function was deleted along with both of its call sites. These were the only guards that checked whether a sender was allowed to trigger verification flows based on `dmPolicy`, `dmEnabled`, and the pairing allow-store.
After this change, any Matrix user — including senders blocked under `dmPolicy: "pairing"`, `dmPolicy: "allowlist"`, or `dmEnabled: false` — can initiate a verification flow and receive SAS emoji/decimal notices forwarded by the bot. The deleted integration tests confirmed this authorization gate was behavioral, not aspirational.
If the intent is to simplify the verification path, the PR should explain why sender authorization is safe to skip here (e.g., because the Matrix protocol's own verification handshake already guards the flow). Without that justification, this is a regression.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: extensions/msteams/src/monitor-handler.ts
Line: 178
Comment:
**MSTeams feedback invoke authorization removed**
The `isFeedbackInvokeAuthorized` check that guarded `handleFeedbackInvoke` was deleted. That function validated three conditions before processing a feedback invoke: (1) the DM sender passes the allowlist/pairing gate, (2) the team/channel route allowlist allows the conversation, and (3) the group sender is on the group allowlist.
With the check removed, any Teams user — regardless of DM policy, team/channel allowlist, or group allowlist — can submit feedback invokes and have them processed. If this is intentional, please add a comment explaining the rationale so reviewers can verify the security model.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: src/gateway/session-utils.ts
Line: 1823-1829
Comment:
**Freshest-session promotion logic removed**
`migrateAndPruneGatewaySessionStoreKey` previously selected the entry with the highest `updatedAt` across all case-variant duplicates and promoted it to the canonical key — ensuring the most recent session survived migration. The new code only copies any matching entry when the canonical key is absent.
If a user has both a stale and a fresh case-variant entry, the new code may promote the stale one depending on `storeKeys` ordering, causing the user to lose their most recent session state on startup. The two deleted tests validated that the freshest entry always wins.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: .vscode/settings.json
Line: 10-19
Comment:
**User-specific VS Code settings committed to shared repo**
The added `chat.agentSkillsLocations` block contains user-machine-specific paths (`~/.copilot/skills`, `~/.agents/skills`, `~/.claude/skills`) and a hard-coded extension version (`~/.vscode-server/extensions/synapsevscode.synapse-1.21.0/copilot/skills`). Committing these to `.vscode/settings.json` will push personal tool configurations to every contributor who pulls this branch.
Entries that are developer-specific should live in `.vscode/settings.json.local` (gitignored) or in VS Code's user settings, not in the project-level settings file.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: .work-folder-info
Line: 1
Comment:
**Editor-generated file accidentally committed**
`.work-folder-info` is a VS Code/Synapse workspace metadata file (`{"version":1}`). It has no meaning to other contributors and should be added to `.gitignore` rather than committed to the repository.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Merge branch 'openclaw:main' into main" | Re-trigger Greptile
|
Thanks for the work here. I re-validated this PR against the stated scope (WSL2 + Ollama diagnostics) and I recommend Request Changes before merge. Scope assessmentThe PR title/body describe a focused fix around WSL2 networking behavior and Ollama/discovery error diagnostics. Actual diff size is much broader:
Files that are in scopeThese are aligned with the stated objective:
Files that are out of scope for this fixLarge portions of the diff touch unrelated plugin and framework areas:
Even if those edits are valid, combining them with a targeted networking/diagnostics fix makes review quality and rollback safety worse. RecommendationPlease split this into focused PRs:
Why this matters
Once split, the WSL2/Ollama fix can move quickly. |
Summary
This pull request makes several important changes to the BlueBubbles extension, focusing on simplifying participant normalization logic, updating SSRF (Server-Side Request Forgery) policy handling, and cleaning up unused code. It also updates configuration defaults and test behaviors. The changes collectively improve maintainability, reduce complexity, and clarify group participant enrichment behavior.
Changes
undici-global-dispatcher.ts — WSL2 autoSelectFamily fix
Imported isWSL2Sync from the existing WSL detection module
Modified resolveAutoSelectFamily() to return false when running on WSL2, even when the Node 22 system default is true
This forces IPv4-only connections for all fetch() calls on WSL2, matching the Telegram extension's behavior
ollama-stream.ts — Improved error diagnostics
The catch block now unwraps err.cause (where undici puts the real network error) and appends it to the error message
Logs the cause via the subsystem logger for diagnostic visibility
Previously, only "fetch failed" was reported, making debugging impossible
models-config.providers.discovery.ts — Better discovery error logging
Appends err.cause.message to the discovery failure log, so the actual underlying network error is visible
undici-global-dispatcher.test.ts — Test coverage
Added mock for isWSL2Sync
Added test: "disables autoSelectFamily on WSL2 to avoid IPv6 connectivity issues" All 11 tests pass
fixed #54498