Skip to content

list: --sort-by/--direction silently dropped on reports/slides/transcripts (latest documents missing from first page) #4

Description

@arcaputo3

Problem

--sort-by date --direction desc only works on events list. On reports list, slides list, and transcripts list the flags are silently dropped (the API ignores them) and results come back oldest-first by createdAt. The failure mode is nasty: the latest filings/calls are simply missing from the first page, so a consumer that trusts the flag confidently grabs stale documents.

Field evidence (agent memory, multiple independent hits):

  • 2026-07-23: "quartr transcripts list --tickers X is NOT date-sorted (returned Q3-25 as 'latest' in Jul-26)."
  • 2026-07-25 (RV peers pull): "transcripts list --tickers X is ALSO unsorted — latest calls missing from first page."
  • 2026-07-22 (NVDA doc pull): same behavior on reports list / slides list — "the flag is silently dropped and results come back oldest-first by createdAt."

The workaround every agent eventually rediscovers (at real token/time cost):

quartr events list --tickers X --sort-by date --direction desc   # pick event id
quartr transcripts list --event-ids <id>                          # then download

Where it lives

internal/cli/flags.go unconditionally forwards sortBy for every list resource (add("sortBy", lf.sortBy)), and the flag help already hedges ("sort field for endpoints that support it") — but nothing tells the user their sort was dropped.

Proposed fix (either/both)

  1. Fail loudly: add a per-resource sortableFields entry to the resource table in internal/cli/resources.go; if --sort-by is passed on a resource that doesn't support it, exit 2 with a message pointing at the events-first recipe.
  2. Or make it work: client-side sort the returned page when the API won't (with a caveat that it only sorts the fetched page), or have the CLI transparently do the events-list-first resolution.

Option 1 is the minimum bar — silent drop is the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions