planetary-social / cleanstr

MIT License
1 stars 0 forks source link

[Bug] Bot applies account warning when encountering objectionable content #53

Open setch-l opened 1 month ago

setch-l commented 1 month ago

Last week I noticed that all of INPC's posts were being flagged by the Tagr Bot and then then yesterday I noticed the same issue happening for https://njump.me/note15tw0pr35wt6umuhgs7ptt2ywtzq42hhdtyh6xjk3fv9550jgt2ysv6p7az - posts.

Steps to reproduce:

  1. Follow the tagr-bot and use Nos
  2. Follow a test account
  3. Log into another app with the test account
  4. Post objectionable content to the test account
  5. Post 3-5 other bland posts with no objectionable content.
  6. Return to your original account and scroll through your feed. Issue: all posts by the test account will have a label that the account itself is causing harassment. Instead of flagging the individual post.

See these slack threads for examples: https://planetary-app.slack.com/archives/C041FUVEHJ6/p1723722558635889

https://planetary-app.slack.com/archives/C041FUVEHJ6/p1723317658852099

dcadenas commented 3 weeks ago

I couldn't reproduce this issue.

I also checked the reports by Tagr-bot, and for the example cases we got, I couldn't find account wide reports made by the bot. This suggests that it's an iOS issue. I then reviewed the iOS code here, and it seems correct.

My hunch is that there might be some state in the warning controller that is being reused, but I'm not very familiar with iOS development, so I'm not sure if this is possible. This has already taken me several hours, so I'll switch back to the followers server and assign this to an iOS developer, which seems more appropriate.

mplorentz commented 6 days ago

@setch-l I'm also not able to reproduce this. Are you? I think we need to catch this again and gather more data. If you can export the database from the Settings screen before the app relaunches and export the logs then I think we'll have enough info to fix this.

I looked through the code as well and couldn't spot any issues. I have opened a small PR to add some logging here. But I think we should add a blocked label to this ticket until we get more data and send it to the backlog.

setch-l commented 5 days ago

@mplorentz @dcadenas - maybe it is contextually aware but I can't even get the tagr-bot to tag posts that are offensive. you can see all of the posts that I posted on this npub: npub1pakthrykgnpcw5zwf7glhffs3mun9kfngymwwh3lgshzxxk4nn8qewdysx

I followed tagr-bot after posting some of them. And then posted some more and the tagr-bot is not catching any of them. I follow the tagr-bot.

So no I can't reproduce but I think it's bc the tagr-bot is not working immediately. Perhaps there is a delay and if you look at these posts later today they will be tagged.

The thing I'm looking for on the posts is: Did the bot tag for a content warning or a user warning. The bug is for a user warning. And I don't think that is accurate.

mplorentz commented 5 days ago

@setch-l I think Tagr-bot is only guaranteed to look at notes mentioning other Nos users (who have opted into push notifications), so you may try mentioning your main account?

I agree with Daniel that this looks like an iOS display bug. I don't think Tagr is actually publishing labels for the whole account. I think Nos is mistakenly saying that it did.

I'll check the lastest reports from Tagr tomorrow though to make sure.

setch-l commented 5 days ago

@dcadenas @mplorentz - My understanding of Tagr-bot is that it tags everything of the people you follow that is offensive. It's not limited to mentions or replies. But let me know if I'm incorrect.

dcadenas commented 5 days ago

@setch-l The content that is automatically analyzed comes from a single source, which is determined by the filters set up in the notifications service. These filters only listen to notes in which Nos users were tagged.

So, it's not analyzing everything posted on the network. The code does not include any logic to automatically flag accounts, so a bug related to this is not possible. Accounts can only be flagged manually, either through the Slack-based interaction or via the public flagging button.

setch-l commented 4 days ago

@dcadenas - what do you mean by tagged? Is that the same as mentioned? I'm asking because previously I wrote content for the tagr-bot saying that it only tagged content of mentions and you said that was not correct. So I re-wrote it to the following based on your feedback. But now you are saying it only tags content of mentions... I'm very confused. https://njump.me/note1d0axg9z0eqm2t9rqc8md7hg2qdrugv29773p277tcm58ymsw0daqtr8uas

dcadenas commented 4 days ago

@setch-l I'm referring to this comment.

I’m talking about tagging from the event's perspective, where tags are used to attach metadata. Specifically, when a user replies to another, the event in the thread should include the p pubkey tag to identify the user being replied to. We filter only by those in the notification service here:

https://github.com/planetary-social/nos-notification-service-go/blob/e26e9c8b96dd24243765f417c287bfd267ddd377/service/app/downloader.go#L393-L413

I traced this decision to this PR which mentions high firestore usage which I assume would also be happening if we expanded the filter to all the network.

This may be a good reason to rewrite the service or refactor the need of firestore

setch-l commented 4 days ago

@dcadenas - Thanks for sharing this. And yes I agree we need to re-write this service. It's way too confusing now and I'm not sure how much value it is providing in it's current state as Matt noted in his later comments in Notion (which I missed).