Skip to content

Fleet metrics drops unavailable_accounts from machine summaries #2112

Closed

Description

@JacobStephens2

This was generated by AI during triage.

What happened

Single-machine thirdshift metrics (Trends in src/logs/metrics.rs:170 and src/console/metrics.html:13) records and displays unavailable_accounts whenever an OS account named in console.other_accounts cannot be read (Unreadable OS accounts: ...).

In Fleet metrics (thirdshift metrics --fleet / --machine and /metrics in Fleet scope), fleet::Summary (src/logs/metrics/fleet.rs:32-38) and MetricsReport drop unavailable_accounts. On lima-thirdshift's Fleet Metrics view, orchestrate (unavailable_accounts: ["conductor", "vsto"]) and test (unavailable_accounts: ["vsto"]) both appeared as status: ok with no indication that configured Other-account Commands on those hosts were unreadable and omitted from the totals.

Agent Brief

Category: bug
Summary: Preserve each machine's unavailable_accounts through Fleet metrics summaries, peer snapshots, pushed reports, JSON/text output, and metrics_fleet.html.

Current behavior:
fleet::Summary (src/logs/metrics/fleet.rs:32-38) deserializes only outcomes, comparison, and where_runs_failed from a machine's Trends, discarding unavailable_accounts.

Desired behavior:

  • Include #[serde(default)] unavailable_accounts: BTreeSet<String> in fleet::Summary (and MetricsReport for metrics --push), so both live reads, cached snapshots, and pushed reports carry each machine's unreadable OS accounts while remaining backward-compatible with older peers and saved snapshots that omit the field.
  • Expose unavailable_accounts: BTreeSet<String> on fleet::Machine in thirdshift metrics --fleet / --machine JSON output, mention unreadable accounts in text Machines lines when non-empty, and render them in src/console/metrics_fleet.html's Machines list (for example · unreadable accounts: conductor, vsto).
  • Update docs/guide.md / site/docs/index.html (npm run docs --prefix site) if the Fleet machines JSON fields are listed there.

Key interfaces:

  • src/logs/metrics/fleet.rs: Summary, Machine, MetricsReport, text formatter
  • src/console/metrics_fleet.html: Machines list item rendering
  • src/logs/metrics/fleet/tests.rs & tests/console.rs

Acceptance criteria:

  • When a local, live-remote, cached, or pushed-report Fleet machine has non-empty unavailable_accounts, fleet::Machine.unavailable_accounts contains them in JSON, text metrics --fleet names them on that machine's line, and metrics_fleet.html renders them in the Machines section.
  • Peer responses and saved snapshots without unavailable_accounts still deserialize with an empty set.
  • cargo test and npm run docs:check --prefix site pass.

Activity

  1. added
    bug
    ready-for-agent
    in-progress
    and removed
    ready-for-agent
    on Nov 12, 2026
  2. removed
    in-progress
    on Nov 12, 2026
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions