Skip to content

Conversation

@dsarno
Copy link
Collaborator

@dsarno dsarno commented Jan 5, 2026

Motivation

  • The read_console tool previously defaulted to only ['error', 'warning'], which omitted ordinary Debug.Log messages.
  • This led to cases where the console appeared empty even when many log entries existed.

Description

  • Changed the default types in Server/src/services/tools/read_console.py from ['error', 'warning'] to ['error', 'warning', 'log'] so Debug.Log output is returned without explicit filters.
  • No other behavior or paging logic in read_console was modified and explicit types parameters remain respected.

Testing

  • No automated tests were executed for this change.
  • Existing integration tests that exercise read_console (for example Server/tests/integration/test_read_console_truncate.py) were not run as part of this rollout.

Codex Task

Summary by Sourcery

Bug Fixes:

  • Ensure read_console returns Debug.Log output by default by including 'log' in the default console types.

Summary by CodeRabbit

  • Changes
    • Console message output now includes log messages by default, in addition to errors and warnings, providing more comprehensive visibility into system activity.

✏️ Tip: You can customize this high-level summary in your review settings.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 5, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the read_console tool’s default message types to include standard log messages in addition to errors and warnings, without changing any other behavior or parameters.

Sequence diagram for read_console default types including log

sequenceDiagram
    actor Developer
    participant Server as ReadConsoleService
    participant Unity as UnityInstance

    Developer->>Server: read_console(ctx, action=None, types=None, format=None)
    Server->>Server: action = 'get' (default)
    Server->>Server: types = ['error','warning','log'] (default)
    Server->>Server: format = 'plain' (default)
    Server->>Unity: get_console_entries(types=['error','warning','log'])
    Unity-->>Server: console_entries
    Server-->>Developer: console_entries (errors, warnings, logs)
Loading

File-Level Changes

Change Details Files
Expand default console message types to include standard log messages when no explicit filter is provided.
  • Adjust the default value assignment for the types parameter to include 'log' alongside 'error' and 'warning' when types is None
  • Leave all other read_console behavior (action handling, paging, formatting, and explicit types arguments) unchanged
Server/src/services/tools/read_console.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 5, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The read_console function's default types parameter was expanded to include 'log' messages alongside 'error' and 'warning'. Previously, the function returned only errors and warnings by default; now it also returns log messages when the types parameter is not explicitly provided.

Changes

Cohort / File(s) Summary
Default parameter expansion
Server/src/services/tools/read_console.py
Updated default value of types parameter from ['error', 'warning'] to ['error', 'warning', 'log'] to broaden the default console message types returned

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested labels

bug

Poem

🐰 hop hop With whiskers twitched and nose held high,
Now logs join warnings in our spy—
Error, warning, log unite,
The console reads with greater might! 📋✨

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 756fc00 and aa656af.

📒 Files selected for processing (1)
  • Server/src/services/tools/read_console.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dsarno dsarno merged commit d6a1a9b into main Jan 5, 2026
1 of 3 checks passed
@dsarno dsarno deleted the codex/debug-read_console-tool-issue branch January 5, 2026 07:20
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Consider whether changing the default to include 'log' messages might surprise existing callers that rely on the previous error/warning-only behavior, and if so, gate this behind an explicit flag or versioned behavior.
  • Including 'log' by default may significantly increase the volume of console entries returned; it may be worth confirming that upstream consumers and any pagination/limits are tuned for this higher throughput.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider whether changing the default to include 'log' messages might surprise existing callers that rely on the previous error/warning-only behavior, and if so, gate this behind an explicit flag or versioned behavior.
- Including 'log' by default may significantly increase the volume of console entries returned; it may be worth confirming that upstream consumers and any pagination/limits are tuned for this higher throughput.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants