Skip to content

[BUG] getBus() missing onWarn callback — bus warnings go to console.warn instead of app.log #159

Description

@four-bytes-robby

Problem

In src/status.ts, the getBus() function calls BusClient.connect() WITHOUT an onWarn callback. This means all bus warnings (stderr output, fallback messages) go to raw console.warn instead of opencode's structured app.log.

Expected

All bus warnings should be routed through _client?.app?.log with proper structured logging.

Proposed Fix

Add onWarn callback to BusClient.connect() that:

  1. Safely JSON-stringifies args (try/catch for circular references)
  2. Routes warnings through _client?.app?.log as level: warn

Affected File

  • src/status.tsgetBus() function (lines ~95-106)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions