Skip to content

/api/mpc/diagnose reports enabled:false but withholds the reason the gateway already knows #766

Description

@Leitet

buildMPC has three distinct skip paths and logs each one at boot:

  • planner disabled in config (silent return);
  • mpc requires price provider — skipping;
  • mpc: no battery capacity — skipping.

The endpoint named diagnose then reports:

{"enabled": false}

The boot log is the only place the reason exists, and on an appliance install nobody is reading boot logs. This made a simple support question ("why won't it plan?") require source-level tracing of buildMPC's gates.

Suggestion: record the skip reason when buildMPC returns nil and expose it as a fixed vocabulary: {"enabled": false, "reason": "planner-disabled" | "no-price-provider" | "no-battery-capacity"}. The Plan view's brief can then say "Planner off — no controllable battery" instead of advising the user to pick a strategy they already picked (see the mode-selector issue).

🤖 Diagnosed with Claude Code

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