Skip to content

Conversation

@blackheaven
Copy link
Contributor

https://wearezeta.atlassian.net/browse/WPB-20429

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Oct 20, 2025
@blackheaven blackheaven force-pushed the gdifolco/WPB-20429_add-replace-channel-member branch from 3a65538 to 7d6cd8d Compare October 20, 2025 20:31
@blackheaven blackheaven marked this pull request as ready for review October 21, 2025 16:53
@blackheaven blackheaven requested review from a team as code owners October 21, 2025 16:53
@blackheaven
Copy link
Contributor Author

@fisx thanks you!

@fisx
Copy link
Contributor

fisx commented Oct 27, 2025

btw i think that the problem with the test that only failed on CI, but not locally, was that ensureLocal was called with example.com, which of course failed on CI (even though I'm not sure why it didn't locally?). anyway if i make the entire test non-federated it works fine. for remote conversations, this end-point should fail indeed (even though 4xx would be nicer than 5xx), so it's ok to not that that here.

i've opened another related ticket to be addressed elsehwere.

Copy link
Contributor

@pcapriotti pcapriotti left a comment

Choose a reason for hiding this comment

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

Looks good. Some comments below. I'm also not sure about the following edge case: what if we want to add user u as admin, but u is already present as a regular member? If I understand the code correctly, nothing would happen. But then u wouldn't be an admin as requested. This violates a general property which you would probably expect. Namely that the outcome of a replace operation does not depend on the current state.

:<|> Named
"replace-members-in-conversation"
( Summary "Replace the members of a conversation."
:> From 'V2
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's a problem in practice, but why V2?

Copy link
Contributor Author

@blackheaven blackheaven Oct 28, 2025

Choose a reason for hiding this comment

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

I have missed the 1 in 12.

Thanks, fixed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be 13, though?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added, but I had to create it

@blackheaven
Copy link
Contributor Author

Looks good. Some comments below. I'm also not sure about the following edge case: what if we want to add user u as admin, but u is already present as a regular member? If I understand the code correctly, nothing would happen. But then u wouldn't be an admin as requested. This violates a general property which you would probably expect. Namely that the outcome of a replace operation does not depend on the current state.

should I upsert them then?

@blackheaven
Copy link
Contributor Author

Looks good. Some comments below. I'm also not sure about the following edge case: what if we want to add user u as admin, but u is already present as a regular member? If I understand the code correctly, nothing would happen. But then u wouldn't be an admin as requested. This violates a general property which you would probably expect. Namely that the outcome of a replace operation does not depend on the current state.

should I upsert them then?

As discussed in DM:

I'm not sure about the requirements there, you probably have a better idea than me about what should be the correct behaviour here. I was just pointing out that slight inconsistency. You can probably leave it, I don't think it matters too much.

The RFC is clear on this:

determine which members need to be added and which members need to be removed and execute the adding and removal,

However, I'm not sure it is intentional

@fisx
Copy link
Contributor

fisx commented Oct 30, 2025

However, I'm not sure it is intentional

i'm pretty sure it's not, but it's the letter of the law. i'll make a ticket where we can decide about actually intended behavior so we can move on here. in short: please follow the RFC.

@blackheaven blackheaven force-pushed the gdifolco/WPB-20429_add-replace-channel-member branch from 7834b0b to 2ec2d87 Compare October 30, 2025 10:03
@eyeinsky
Copy link
Contributor

Just a drive-by comment, but as I just noticed the last commit adding V13: it's already present in the develop branch from here 1c2d211 -- just need to rebase.

@blackheaven
Copy link
Contributor Author

Just a drive-by comment, but as I just noticed the last commit adding V13: it's already present in the develop branch from here 1c2d211 -- just need to rebase.

nice, thanks!

@blackheaven blackheaven force-pushed the gdifolco/WPB-20429_add-replace-channel-member branch from 2ec2d87 to 7da2b34 Compare October 30, 2025 10:27
@fisx
Copy link
Contributor

fisx commented Oct 30, 2025

----- MLS.SubConversation.testResendingProposals FAIL (7.48 s; failed at 2025-10-30T10:53:54.755Z) -----
assertion failure:
Failed spawning process

call stack: 
1. assertFailure at test/MLS/Util.hs:836

2. spawn at test/MLS/Util.hs:130

3. runCli at test/MLS/Util.hs:108

4. mlscli at test/MLS/Util.hs:704

5. mlsCliConsume at test/MLS/Util.hs:677

6. consumeMessageWithPredicate at test/MLS/Util.hs:683

7. consumeMessage at test/Test/MLS/SubConversation.hs:381

huh? as in "Failed spawning unix process"? smells flaky.

@blackheaven blackheaven force-pushed the gdifolco/WPB-20429_add-replace-channel-member branch from 7da2b34 to 6e29aad Compare October 30, 2025 16:28
Copy link
Contributor

@battermann battermann left a comment

Choose a reason for hiding this comment

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

Approved on behalf of Paolo and Matthias

@blackheaven blackheaven merged commit bc98c08 into develop Oct 31, 2025
9 checks passed
@blackheaven blackheaven deleted the gdifolco/WPB-20429_add-replace-channel-member branch October 31, 2025 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants