Skip to content

History filters (outcome, repository, Metrics failure drilldown) have no CLI twin #2084

Open

Description

@JacobStephens2

Finding

The Console's History page (/history) has query filters with no CLI twin. Its existing outcome= and repository= filters are already page-only. Pull request #2083 (for #2067) adds the Metrics failure drilldown keys stopped_at + category, or failed_on + failed_kind + failed_account, together with the Metrics view's own filters. History's twin, thirdshift status --local --all --json, accepts none of them, and the OpenAPI document declares none of them for /history.

Evidence

  • ADR 0016, Consequences: "Every view and action on the page is also a CLI command with --json, and a test pairs them." ADR 0026: "Every endpoint is the twin of a CLI command… returns the same JSON as that command's --json."
  • src/console.rs (render_page) reads outcome and repository with query_value and passes them only to the HTML archive. read.json(&config, all) serves /api/v1/history unfiltered.
  • In Record thirdshift version and failure attribution, with a Where runs failed drilldown (#2067) #2083, src/console/metrics.rs::chosen resolves a drilldown by reading the Metrics view again. metrics --json already lists the same Commands (where_runs_failed.rows[].commands[].selector, outcomes[].failed_commands), so the CLI can reach each Command with thirdshift show <selector>. It cannot list them as filtered History, though.

Raised by

The Standards (S1) and Spec (P4) reviews of pull request #2083.

Why the implementing session did not decide it

The gap predates #2067: History's page-only filters were already there. Closing it means choosing a CLI surface for History, such as new thirdshift status --all flags and how they combine with --json, plus OpenAPI parameters. That is a product and API decision beyond #2067's scope. #2067 asked only that failure clusters link through to History or Command details, so the Day shift should decide whether, and how, History's filters get a CLI twin.

Activity

  1. added
    needs-triage
    in-progress
    and removed
    needs-triage
    on Nov 12, 2026
  2. JacobStephens2 commented on Nov 12, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Investigation summary

    Confirmed on selected Base commit b9b164a. History filter parity is incomplete under ADR 0016 and ADR 0026, but the CLI contract needs a Day shift decision before implementation.

    Evidence:

    • src/console.rs:1389–1444 reads outcome and repository, supplies them only to read.archive for HTML, and renders JSON through read.json(&config, all) without those filters. /api/v1/history therefore ignores these filters.
    • src/args.rs:884–909 accepts only --all, --json, --machine and --local for status; no History filter flags exist.
    • src/console/openapi.rs:165 declares no History query parameters. The route at src/console.rs:860 identifies status --local --all --json as its twin.
    • src/logs/status/inbox.rs:576–635 excludes live Commands from HTML History, sorts by ending time, and intersects exact repository matching with normalized or raw outcome matching. status --all instead includes live Commands. Adding flags requires an explicit decision about this difference.
    • tests/console.rs:439 covers HTML History filtering. tests/console/api.rs:505 pairs only unfiltered History with status --all --json; filtered parity is not covered.

    PR #2083 remains open from issue-2067 into issue-2036. Its diff confirms that console/metrics.rs::chosen recomputes Metrics and selects failure-row or bucket Command selectors, but render_page still returns unfiltered History JSON. Those drilldown changes are absent from this selected Base, so this portion is confirmed by diff inspection rather than execution.

    Open-issue searches found no separate issue covering this History CLI contract. #2067 covers recording and clickable failure drilldown; #2068 covers Fleet aggregation and forwarding, rather than the missing filtered History CLI.

    Recommended next step: settle the CLI surface and row semantics, then consider two Tickets: baseline outcome/repository parity, followed by Metrics drilldown parity dependent on the baseline and #2067. Keep #2084 ready-for-human until these decisions are recorded.

    Questionnaire

    For the Day shift deciding #2084: the existing History HTML filters have no CLI/API equivalent. ADR 0016 and ADR 0026 require parity, and the repository confirms the gap. Please decide:

    1. Should filtered History extend status --all, or have a dedicated thirdshift history command? I recommend a dedicated command because History excludes live Commands while status --all includes them. This settles the command, flag names, JSON contract and compatibility expectations before implementation.
    2. Should filtered JSON preserve History's owning rows, including an owning row when a descendant matches a Metrics selector, or return only the exact matching Commands? I recommend preserving the existing History presentation semantics and reusing one selection implementation across CLI, API and HTML. This resolves how Spec and dispatcher trees appear in drilldowns.
    3. Approve two Tickets, or keep this as one bounded Ticket after Record thirdshift version and structured failure attribution with Where runs failed drilldown #2067 lands? Proposed split: A implements outcome/repository selection across CLI, API, HTML, OpenAPI and filtered parity checks; B adds Metrics row/bucket selection with the carried Metrics filters after A and Record thirdshift version and structured failure attribution with Where runs failed drilldown #2067, preserving the owning-machine forwarding required by Fleet Metrics aggregation (metrics --fleet), default Fleet scope, and local peer-snapshot cache #2068. This establishes scope and dependencies without duplicating the Metrics Tickets.
  3. added
    enhancement
    ready-for-human
    and 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

    enhancementready-for-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions