Skip to content

fix(relay): retry agent profile sync on membership_required 403 - #3899

Open
Chessing234 wants to merge 3 commits into
block:mainfrom
Chessing234:fix/agent-profile-membership-retry
Open

Chessing234 wants to merge 3 commits into
block:mainfrom
Chessing234:fix/agent-profile-membership-retry

Conversation

@Chessing234

Copy link
Copy Markdown
Contributor

Summary

  • Classify relay_membership_required 403 responses during managed-agent kind:0 profile sync.
  • Retry up to three times with 200/350/500ms backoff when membership may appear shortly after agent creation.
  • Fail closed with the relay error string after retries are exhausted.

Fixes #3888

Test plan

  • cargo test --manifest-path desktop/src-tauri/Cargo.toml relay::tests::membership_required (CI)
  • Create an agent on a closed self-hosted relay; profile sync succeeds without a persistent metadata error

Made with Cursor

Add a pure helper and unit tests so managed-agent profile sync can tell
membership 403s apart from other relay rejections before retrying.

Signed-off-by: Taksh <takshkothari09@gmail.com>
Wait 200/350/500ms and retry up to three times when the relay returns
relay_membership_required, then fail closed with the relay error string.

Signed-off-by: Taksh <takshkothari09@gmail.com>
@Chessing234
Chessing234 requested a review from a team as a code owner July 31, 2026 10:42
@Chessing234

Copy link
Copy Markdown
Contributor Author

@tlongwell-block @wesbillman @wpfleger96 mind taking a look when you get a chance?

@Chessing234
Chessing234 force-pushed the fix/agent-profile-membership-retry branch from d31c61d to 8157ed9 Compare August 5, 2026 10:35
Signed-off-by: Taksh <takshkothari09@gmail.com>
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 59328d5ae38a51a618dd2fddd7faf1343d42096f...0296334285d010accd7f2330ce09d062289ea4c9.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review 0296334285d010accd7f2330ce09d062289ea4c9 to authorize a new review.
Any previous review applies only to its recorded range.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Self-hosted relay: agent's first profile publish (kind:0) gets 403 relay_membership_required, client never retries after membership resolves

1 participant