Skip to content

Remove redundant lost-and-found warning log#6527

Merged
masenf merged 2 commits into
mainfrom
claude/remove-warning-log-kyoxv
May 18, 2026
Merged

Remove redundant lost-and-found warning log#6527
masenf merged 2 commits into
mainfrom
claude/remove-warning-log-kyoxv

Conversation

@masenf
Copy link
Copy Markdown
Collaborator

@masenf masenf commented May 18, 2026

The warning "Failed to send delta to lost and found for client" was duplicative — emit_lost_and_found already logs the underlying cause (either "Redis token owner not found" or "Redis error publishing lost and found delta") for both failure modes. The extra warning wasn't actionable and confused users.

The warning "Failed to send delta to lost and found for client" was
duplicative — emit_lost_and_found already logs the underlying cause
(either "Redis token owner not found" or "Redis error publishing
lost and found delta") for both failure modes. The extra warning
wasn't actionable and confused users.
@masenf masenf requested a review from a team as a code owner May 18, 2026 23:51
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 18, 2026

Greptile Summary

This PR removes a redundant console.warn in emit_update that fired whenever emit_lost_and_found returned False. Both failure paths inside that method already emit their own log messages (console.warn for a missing Redis token owner and console.error for a Redis publish error), making the outer warning a duplicate that added noise without actionable information.

  • Removes the if not await ... guard and its console.warn("Failed to send delta to lost and found for client …") in reflex/app.py, leaving a plain await call.
  • No behavioral change: failures are still logged at the correct level inside emit_lost_and_found and _get_token_owner; the boolean return value of emit_lost_and_found is now ignored since there is nothing to act on at the call site.

Confidence Score: 5/5

Safe to merge — the removed warning was purely cosmetic and every failure case remains logged inside the callee.

The change is a four-line deletion of a warning that duplicated existing log output. All failure modes in emit_lost_and_found and _get_token_owner continue to log their own messages, so observability is unchanged. There is only one call site, no test regressions to worry about, and no behavioral change.

No files require special attention.

Important Files Changed

Filename Overview
reflex/app.py Removes a redundant console.warn that duplicated logs already emitted inside emit_lost_and_found; the return value (bool) is now discarded but that is consistent with no action being needed at the call site.

Sequence Diagram

sequenceDiagram
    participant EU as emit_update (app.py)
    participant ELF as emit_lost_and_found (token_manager.py)
    participant GTO as _get_token_owner
    participant Redis

    EU->>ELF: await emit_lost_and_found(token, update)
    ELF->>GTO: _get_token_owner(token)
    alt Token found in Redis
        GTO-->>ELF: instance_id
        ELF->>Redis: publish(lost_and_found_channel, record)
        alt Publish succeeds
            Redis-->>ELF: OK
            ELF-->>EU: True (ignored)
        else Publish fails
            Redis-->>ELF: Exception
            ELF->>ELF: console.error("Redis error publishing lost and found delta")
            ELF-->>EU: False (ignored)
        end
    else Token NOT found in Redis
        GTO->>GTO: console.warn("Redis token owner not found")
        GTO-->>ELF: None
        ELF-->>EU: False (ignored)
    else Redis error getting token
        GTO->>GTO: console.error("Redis error getting token owner")
        GTO-->>ELF: None
        ELF-->>EU: False (ignored)
    end
    Note over EU,ELF: Removed: console.warn("Failed to send delta to lost and found")
Loading

Reviews (1): Last reviewed commit: "Remove redundant lost-and-found warning ..." | Re-trigger Greptile

This warning fired whenever a token wasn't registered in Redis, which
can happen normally (e.g. expired tokens). It wasn't actionable and
confused users.
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 18, 2026

Merging this PR will not alter performance

✅ 24 untouched benchmarks


Comparing claude/remove-warning-log-kyoxv (0e16173) with main (fbd85e3)

Open in CodSpeed

@masenf masenf merged commit 048c7d8 into main May 18, 2026
70 checks passed
@masenf masenf deleted the claude/remove-warning-log-kyoxv branch May 18, 2026 23:59
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.

4 participants