Repository navigation
fix: retry SMTP 4xx, 503 on agent auth DB errors, scope checkGroupUid to the org - #973
Merged
Merged
Conversation
…clairamb/solidping-business#100) A "452 4.4.5 rate limit" reply to RCPT TO failed the notification job for good: IsRetryableSendError (internal/email/sender.go) only read the code from a *textproto.Error, and go-mail returns its own SendError. It now uses smtpReply(), so any 4xx is retryable; the email notification sender wraps it in a RetryableError, which the notification job retries after its backoff (job_notification.go also honours RetryableError now), as does the email job. go-mail's ", affected recipient(s): ..." suffix is stripped from the logged and returned error. TestSend_RateLimitReplyIsRetryableAndRedacted fails before the fix. Closes fclairamb/solidping-business#100 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…iramb/solidping-business#101) During a database outage every agent reconnect got a 401: serveReconnect (internal/handlers/agentws/handler.go) answered "Unknown agent" to any GetAgent error and "Nonce already used" to any nonce store error, and serveEnrollment read any token lookup error as a bad token (the DB layer mapped every error to ErrEnrollmentTokenInvalid). Only not found, a bad signature or a replayed nonce now give 401 (a malformed agent UID is rejected before the lookup); other errors give 503 with Retry-After, logged at WARN. The agent treats a 5xx handshake as a lost connection (WARN once, re-claim). TestAgentAuthDatabaseDownIs503, TestReconnectNonceStoreFailureIs503 and TestWSBackendDial5xxIsConnLoss fail before the fix. Closes fclairamb/solidping-business#101 Co-Authored-By: Claude Opus 5.5 <[email protected]>
… clone (fclairamb/solidping-business#102) A group slug passed as checkGroupUid (the MCP tools document "UID or slug") reached Postgres as is and failed as an invalid uuid (22P02): the caller got an internal error. CreateCheck, UpdateCheck and CloneCheck (internal/handlers/checks/service.go) copied the value without a lookup, so another org's group UID was accepted too. They now resolve it with GetCheckGroupByUidOrSlug in the caller's org and return ErrCheckGroupNotFound (400) otherwise; "" still ungroups. Upsert goes through update/create, import already resolves groups by name. TestCheckGroupUIDResolvedWithinOrg fails before the fix. Closes fclairamb/solidping-business#102 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #973 +/- ##
=======================================
Coverage 90.90% 90.90%
=======================================
Files 1405 1405
Lines 145221 145270 +49
=======================================
+ Hits 132006 132055 +49
Misses 13207 13207
Partials 8 8
🚀 New features to boost your workflow:
|
Merged
fclairamb
added a commit
that referenced
this pull request
Nov 21, 2026
…invitation page (#974) Stacked on #973: merge it first. Closes fclairamb/solidping-business#103 ## What changes - **Server:** every OAuth provider (Google, GitHub, GitLab, Microsoft, Discord, Slack, OIDC) now logs a WARN `OAuth token exchange failed` with the provider and its answer when the authorization code exchange fails. The message shown to the user is unchanged. Until now the provider's reason (code already used, expired, `redirect_uri` mismatch) was dropped, so a `TOKEN_EXCHANGE_FAILED` could not be diagnosed. - **Dashboard:** the invitation page shows a refused sign-in (`error_description` in the URL) in a banner (`data-testid="invite-oauth-error"`), so a sign-in started from an invitation that fails comes back to it with a visible error. The error hidden inside `returnTo` was already fixed by dda98b7 (login page lifts it out and strips it from the retry destination). ## Tests - `TestTokenExchangeFailureIsLogged` (fails on the old code). - `web/dash0/e2e/invitations.spec.ts`: new case for the error banner. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
fclairamb
added a commit
that referenced
this pull request
Nov 22, 2026
🤖 I have created a release *beep* *boop* --- ## [0.53.0](v0.52.0...v0.53.0) (2026-11-22) ### Features * **auth:** OIDC-only mode with IdP group admin roles ([#966](#966)) ([1b51f89](1b51f89)) * **service:** install writes config.env, unit loads it via EnvironmentFile ([#948](#948)) ([e4b7fc4](e4b7fc4)) ### Bug Fixes * **aggregation:** drain the raw backlog in one run and log lag ([#978](#978)) ([26b93cd](26b93cd)) * **deps:** update github.com/dop251/goja digest to 79d6ad3 ([#972](#972)) ([02c6821](02c6821)) * **deps:** update go dependencies (non-major) ([#955](#955)) ([7dfbcd6](7dfbcd6)) * **deps:** update go dependencies (non-major) ([#968](#968)) ([6c09bae](6c09bae)) * **deps:** update go dependencies (non-major) ([#979](#979)) ([ee088b6](ee088b6)) * **deps:** update module github.com/oapi-codegen/oapi-codegen/v2 to v2.9.0 ([#975](#975)) ([1121e2e](1121e2e)) * **deps:** update module go.mongodb.org/mongo-driver/v2 to v2.10.1 ([#950](#950)) ([9e684c4](9e684c4)) * email validation, OAuth error display, translator crash guard, clone slugs, watchdog pauses ([#959](#959)) ([a20f951](a20f951)) * log OAuth code-exchange failures, show a refused sign-in on the invitation page ([#974](#974)) ([c4a8dca](c4a8dca)) * retry SMTP 4xx, 503 on agent auth DB errors, scope checkGroupUid to the org ([#973](#973)) ([88179aa](88179aa)) * **security:** block WebRTC around the browser egress proxy, survive an invalid status page ?lang= ([#957](#957)) ([79bdc82](79bdc82)) * **security:** keep OIDC-group admin grants revocable, mask resolved channel references, contain browser popups ([#976](#976)) ([6e0f09e](6e0f09e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Batch of fixes for three production issues seen on 2026-11-20.
452 4.4.5 Rate limit exceededwas classified as permanent and the alert was dropped).IsRetryableSendErrornow recognises go-mail'sSendErrorcodes; recipient addresses are stripped from the logged and stored error.Retry-Afteron database errors instead of 401 (reconnect, nonce store, enrollment token lookup, Postgres and SQLite). Malformed agent UIDs are rejected before the lookup. The agent treats a 5xx at dial as a lost connection (WARN, retry).checkGroupUidis resolved inside the caller's org (UID or slug) on create, update/upsert and clone: an unknown or foreign group gets 400 "check group not found" (REST and MCP), no more22P02from Postgres. Empty string still ungroups.Not covered: a dedicated send-rate limiter after a rate-limit reply (retries use the job backoff); the import dry-run planner doesn't validate the group.
Closes fclairamb/solidping-business#100
Closes fclairamb/solidping-business#101
Closes fclairamb/solidping-business#102
🤖 Generated with Claude Code