1.154.0 by Codex (merged)#62
Conversation
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| if not ( | ||
| SYNAPSE_BOT_PATTERN.match(u) or HUNGRYSERV_BOT_PATTERN.match(u) | ||
| ) | ||
| } |
There was a problem hiding this comment.
Filter applied after encoding — stored JSON still contains bots: content_json = json_encoder.encode(content) runs at line 785 before this block mutates content["ignored_users"]. The simple_upsert_txn below writes the original content_json, so account_data.content keeps the bridge bot in m.ignored_user_list. Only the denormalized ignored_users table (built from the mutated content) is filtered, which is why the new test_ignoring_bot_users passes — it only checks store.ignored_users(...). Clients fetching their account data will still see the bot in their ignored list while the server treats it as not ignored. Move this block above the json_encoder.encode(content) call (or re-encode after filtering).
| user_id=requester.user.to_string(), | ||
| event_id=event_id, | ||
| allow_backward=allow_backward, | ||
| extra_content=body, |
There was a problem hiding this comment.
Control fields leak into stored receipt / fully-read content: passing extra_content=body here (and at line 143) means every request body key — including thread_id, com.beeper.allow_backward, and any other top-level field the client sent — gets merged into the receipt EDU data (data={"ts": ..., **(extra_content or {})} in synapse/handlers/receipts.py:200) and into the fully-read account-data content (content = {"event_id": event_id, **(extra_content or {})} in synapse/handlers/read_marker.py:82). Those values then get federated to remote servers and synced down to other clients. The sibling ReadMarkerRestServlet (synapse/rest/client/read_marker.py:108-118) shows the intended pattern — plucking body.get("com.beeper.fully_read.extra") / body.get("com.beeper.read.extra") so only the explicit "extra" subkey is forwarded. This endpoint should do the same.
|
|
||
| if "done" in body: | ||
| delta_ms = body["done"].get("at_delta") or 0 | ||
| done = {"updated_ts": ts, "at_ts": ts + delta_ms} |
There was a problem hiding this comment.
Logs the wrong at_order: body.get('at_order') always returns None here because at_order only ever lives under body['done'] (see the storage path at line 351 which correctly uses body['done']['at_order']). The earlier commit "Look for done.at_order in the correct place" fixed the storage write but missed this log line. Replace with body['done'].get('at_order').
| done = {"updated_ts": ts, "at_ts": ts + delta_ms} | |
| f"SetBeeperDone done_delta_ms={delta_ms} at_order={body['done'].get('at_order')}" |
| def _should_count_as_unread(event: EventBase, context: EventContext) -> bool: | ||
| def _should_count_as_unread( | ||
| event: EventBase, | ||
| context: EventContext, |
There was a problem hiding this comment.
Misleading parameter name: this is named non_bot_room_members_count but the caller at line 502 passes room_member_count, which is the unfiltered joined-member count from self.store.get_number_joined_users_in_room (bots included). The < 20 threshold for reaction-unread is therefore comparing against an inflated count in DM-with-bridge-bot rooms. Either rename the parameter to room_member_count to reflect reality, or actually compute a non-bot count and keep the name.
c1efa7d to
b4f81c5
Compare
Annoying! Will lave that to upstream and we'll get updates as we rebase.
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
Still broken because the opentracing module upstream uses has long been retried and setuptools broke it.
- reduce hardcoded task parallelism - add hardcoded post task sleep
c7e280a to
cee0934
Compare
cee0934 to
b026e54
Compare
No description provided.