Commit Graph

198 Commits

Author SHA1 Message Date
Jonathan Jing 84fa7e2baa fix(mattermost): parse status code before matching generic '429' text
- Fix isRetryableError: check 'mattermost api 429' status code BEFORE
  generic '429' text match to avoid false positives
- Error messages containing '429' in detail (e.g., 'Invalid ID: 4294967295')
  are no longer incorrectly treated as rate limiting
- Add test for 400 error containing '429' text to verify no false retry
2026-03-17 16:45:42 +00:00
Jonathan Jing ead65cf04c fix(mattermost): fix port number false positives and timeout test
- Fix isRetryableError: use 'mattermost api NNN' prefix pattern instead of
  \b\d{3}\b to avoid matching port numbers (e.g., :443) and IP octets
- Fix timeout test: properly verify AbortController aborts the fetch by
  listening to the abort event on the signal
- Add test for port 443 connection errors to verify no false 4xx classification
- Update error messages in tests to use 'Mattermost API NNN' format
2026-03-17 16:45:42 +00:00
Jonathan Jing b63c1379d1 fix(mattermost): add dmChannelRetry to MattermostAccountConfig type
Add missing dmChannelRetry field to TypeScript type definition in types.ts
to match the Zod schema in config-schema.ts. Fixes type checking error
when accessing account.config.dmChannelRetry.
2026-03-17 16:45:42 +00:00
Jonathan Jing 4e6080d476 fix(mattermost): address Greptile review - isRetryableError ordering and jitter
- Fix isRetryableError: check 5xx BEFORE 4xx to prevent misclassification
  when 5xx error detail contains 4xx substring (e.g., '503: upstream 404')
- Fix jitter: use proportional jitter (full-jitter pattern) instead of
  hardcoded 1000ms. Jitter is now 0-100% of exponential delay
- Update tests to reflect new jitter behavior
- Add test for 5xx with 4xx substring in error message
2026-03-17 16:45:42 +00:00
Jonathan Jing be0e870d94 fix(mattermost): address review feedback for DM retry logic
- Fix timeoutMs: pass AbortSignal to createMattermostDirectChannel and fetch
- Fix isRetryableError false positives: check for explicit 4xx status codes
  before falling back to network pattern matching
- Fix onRetry callback: preserve user's callback while adding logging
- Add Zod schema refinement: validate initialDelayMs <= maxDelayMs
- Add tests for 4xx false positive cases and AbortSignal propagation
2026-03-17 16:45:42 +00:00
Jonathan Jing 1fb94b5460 feat(mattermost): add retry logic and timeout handling for DM channel creation
Adds exponential backoff retry mechanism for Mattermost DM channel creation
to handle transient failures (429, 5xx, network errors).

Changes:
- Add createMattermostDirectChannelWithRetry() with configurable retry options
- Support maxRetries, initialDelayMs, maxDelayMs, timeoutMs parameters
- Add dmChannelRetry config option to Mattermost account schema
- Allow per-send override via dmRetryOptions in MattermostSendOpts
- Add comprehensive tests for retry logic and error handling
- Retry on: 429 rate limits, 5xx server errors, network/transient errors
- Don't retry on: 4xx client errors (except 429)

Fixes the gap identified in PR #29925 where initial DM channel creation
failures had no retry mechanism.
2026-03-17 16:45:42 +00:00
Peter Steinberger 4b125762f6
refactor: clean extension api boundaries 2026-03-17 09:38:21 -07:00
Peter Steinberger f9588da3e0
refactor: split plugin testing seam from bundled extension helpers 2026-03-17 01:05:09 -07:00
Peter Steinberger f6868b7e42
refactor: dedupe channel entrypoints and test bridges 2026-03-16 23:52:23 -07:00
Peter Steinberger f2bd76cd1a
refactor: finalize plugin sdk legacy boundary cleanup 2026-03-16 22:51:46 -07:00
Peter Steinberger 9ebe38b6e3
refactor: untangle remaining plugin sdk boundaries 2026-03-16 21:16:32 -07:00
Peter Steinberger 78869f1517 refactor(mattermost): reuse patched setup adapter 2026-03-17 04:09:49 +00:00
Vincent Koc f5ef936615 Tests: replace local channel contracts 2026-03-15 23:46:45 -07:00
Vincent Koc 13090da3ac Tests: add Mattermost channel contract suite 2026-03-15 23:32:13 -07:00
Peter Steinberger f6f0045e0f
test: move setup surface coverage 2026-03-15 22:01:04 -07:00
Peter Steinberger 5c120cb36c
refactor: make setup the primary wizard surface 2026-03-15 22:01:04 -07:00
Vincent Koc 92bea9704e Channels: add message action capabilities 2026-03-15 21:55:45 -07:00
Peter Steinberger 98dcbd3e7e
build: add setup entrypoints for migrated channel plugins 2026-03-15 20:44:26 -07:00
Peter Steinberger 8ab01c5c93
refactor(core): land plugin auth and startup cleanup 2026-03-15 20:12:37 -07:00
Peter Steinberger 3f12e90f3e
fix(ci): repair security and route test fixtures 2026-03-15 19:54:00 -07:00
Vincent Koc 6513749ef6 Mattermost: split setup adapter helpers 2026-03-15 19:26:13 -07:00
Peter Steinberger 60bf58ddbc
refactor: trim onboarding sdk exports 2026-03-15 19:14:36 -07:00
Peter Steinberger 59bcac472e fix: gate setup-only plugin side effects 2026-03-16 01:05:42 +00:00
Peter Steinberger 1f37203f88
refactor: move signal imessage mattermost to setup wizard 2026-03-15 17:06:42 -07:00
Vincent Koc 5e78c8bc95
Webhooks: tighten pre-auth body handling (#46802)
* Webhooks: tighten pre-auth body handling

* Webhooks: clean up request body guards
2026-03-15 09:45:18 -07:00
Vincent Koc a47722de7e
Integrations: tighten inbound callback and allowlist checks (#46787)
* Integrations: harden inbound callback and allowlist handling

* Integrations: address review follow-ups

* Update CHANGELOG.md

* Mattermost: avoid command-gating open button callbacks
2026-03-15 09:24:24 -07:00
Teconomix 0c926a2c5e
fix(mattermost): carry thread context to non-inbound reply paths (#44283)
Merged via squash.

Prepared head SHA: 2846a6cfa9
Co-authored-by: teconomix <6959299+teconomix@users.noreply.github.com>
Co-authored-by: mukhtharcm <56378562+mukhtharcm@users.noreply.github.com>
Reviewed-by: @mukhtharcm
2026-03-14 12:23:23 +05:30
Peter Steinberger 49a2ff7d01
build: sync plugins for 2026.3.14 2026-03-14 06:05:39 +00:00
Peter Steinberger 97dc493e2a refactor: share extension channel status summaries 2026-03-14 02:40:27 +00:00
Peter Steinberger e885f1999f refactor: reduce extension channel setup duplication 2026-03-14 02:40:27 +00:00
Peter Steinberger 74e50d3be3 test: share send cfg threading helpers 2026-03-14 02:40:27 +00:00
Peter Steinberger 55ebdce9c3 refactor: share open allowFrom config checks 2026-03-14 02:40:27 +00:00
Peter Steinberger 91d9573b55 refactor: declone model picker model ref parsing 2026-03-14 01:41:17 +00:00
Peter Steinberger 83571fdb93 refactor: dedupe agent list filtering 2026-03-13 21:40:53 +00:00
Peter Steinberger ba2d57d024 refactor: share mattermost test harnesses 2026-03-13 20:37:53 +00:00
Peter Steinberger 48853f875b refactor: share test request helpers 2026-03-13 20:37:53 +00:00
Peter Steinberger 2dd180472f refactor: share mattermost interaction test helpers 2026-03-13 20:19:39 +00:00
Peter Steinberger 16ececf0a6
chore: bump version to 2026.3.13 2026-03-13 04:38:32 +00:00
Peter Steinberger c25e46a433
chore: prepare 2026.3.12 release 2026-03-13 01:38:20 +00:00
Lyle c965049dc6
fix(mattermost): pass mediaLocalRoots through reply delivery (#44021)
Merged via squash.

Prepared head SHA: 856f11f129
Co-authored-by: LyleLiu666 <31182860+LyleLiu666@users.noreply.github.com>
Co-authored-by: mukhtharcm <56378562+mukhtharcm@users.noreply.github.com>
Reviewed-by: @mukhtharcm
2026-03-12 20:13:51 +05:30
Teconomix 171d2df9e0
feat(mattermost): add replyToMode support (off | first | all) (#29587)
Merged via squash.

Prepared head SHA: 4a67791f53
Co-authored-by: teconomix <6959299+teconomix@users.noreply.github.com>
Co-authored-by: mukhtharcm <56378562+mukhtharcm@users.noreply.github.com>
Reviewed-by: @mukhtharcm
2026-03-12 18:03:12 +05:30
Mathias Nagler e8a162d3d8
fix(mattermost): prevent duplicate messages when block streaming + threading are active (#41362)
* fix(mattermost): prevent duplicate messages when block streaming + threading are active

Remove replyToId from createBlockReplyPayloadKey so identical content is
deduplicated regardless of threading target. Add explicit threading dock
to the Mattermost plugin with resolveReplyToMode reading from config
(default "all"), and add replyToMode to the Mattermost config schema.

Fixes #41219

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(mattermost): address PR review — per-account replyToMode and test clarity

Read replyToMode from the merged per-account config via
resolveMattermostAccount so account-level overrides are honored in
multi-account setups. Add replyToMode to MattermostAccountConfig type.
Rename misleading test to clarify it exercises shouldDropFinalPayloads
short-circuit, not payload key dedup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Replies: keep block-pipeline reply targets distinct

* Tests: cover block reply target-aware dedupe

* Update CHANGELOG.md

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-03-12 03:15:17 -04:00
Peter Steinberger ce5dd742f8
build: sync versions to 2026.3.11 2026-03-12 04:01:57 +00:00
Peter Steinberger 0e397e62b7 chore: bump version to 2026.3.10 2026-03-11 23:29:53 +00:00
Peter Steinberger a455c0cc3d refactor: share passive account lifecycle helpers 2026-03-10 22:18:04 +00:00
Echo bda63c3c7f
fix(mattermost): preserve markdown formatting and native tables (#18655)
Merged via squash.

Prepared head SHA: d30fff1776
Co-authored-by: echo931 <259437483+echo931@users.noreply.github.com>
Co-authored-by: mukhtharcm <56378562+mukhtharcm@users.noreply.github.com>
Reviewed-by: @mukhtharcm
2026-03-10 17:40:01 +05:30
Teconomix 6d0547dc2e
mattermost: fix DM media upload for unprefixed user IDs (#29925)
Merged via squash.

Prepared head SHA: 5cffcb072c
Co-authored-by: teconomix <6959299+teconomix@users.noreply.github.com>
Co-authored-by: mukhtharcm <56378562+mukhtharcm@users.noreply.github.com>
Reviewed-by: @mukhtharcm
2026-03-10 14:22:24 +05:30
Daniel Hnyk 450d49ea52
fix(mattermost): read replyTo param in plugin handleAction send (#41176)
Merged via squash.

Prepared head SHA: 33cac4c33f
Co-authored-by: hnykda <2741256+hnykda@users.noreply.github.com>
Co-authored-by: mukhtharcm <56378562+mukhtharcm@users.noreply.github.com>
Reviewed-by: @mukhtharcm
2026-03-10 13:19:54 +05:30
Peter Steinberger f6d0712f50 build: sync plugin versions for 2026.3.9 2026-03-09 08:39:52 +00:00
Peter Steinberger 5fca4c0de0 chore: prepare 2026.3.8-beta.1 release 2026-03-09 07:09:37 +00:00