Skip to content

fix(tools): gh-dash costs about 9 GraphQL points at start and 28 an hour as shipped, so the config refreshes hourly with the preview closed and the docs state the real numbers #1918

Closed

Description

@dan-petty

Problem

The docs and the task file of the gh-dash pin (#1882) state the GraphQL cost of gh-dash with numbers that the source does not support. They say about 7 points at start, about 5 points for each refresh and about 20 points an hour at a refresh every 15 minutes. A person measured +124 GraphQL points in 22 seconds at the first start of gh-dash with the shipped .gh-dash.yml. The GitHub budget is a hard shared limit of 5,000 GraphQL points an hour for the token, and AI agents use the same token.

Evidence

A read-only study of the gh-dash 4.26.2 source (tag v4.26.2) and three rateLimit(dryRun: true) calls gave this:

  • At start gh-dash fetches only the sections of the start view. With the shipped config that is 4 pull request sections. It also runs two GraphQL calls: viewer { login } (1 point) and a version check on dlvhdr/gh-dash (1 point, GraphQL and not REST).
  • A pull request section costs 1 point at limit: 20 and 2 points at limit: 50. An issue section costs about 1 point.
  • With the preview pane open, each newly selected row runs an enriched query that costs 2 points. The preview starts open (defaults.preview.open).
  • refetchIntervalMinutes refreshes all sections of the current view, not only the current section (internal/tui/ui.go:732-735).
  • The computed start cost is about 9 points, and the computed cost is about 28 points an hour at a 15-minute refresh with the preview open. The claim "about 20 an hour" fits only the case with the preview closed.
  • The measured +124 points are not explained by gh-dash (about 114 points unexplained). The measuring tool devops gh rate-limit adds 1 core and 1 GraphQL point for each run. The token is shared with other tools. The cause is not confirmed.

Remedy

  1. Lower the recurring cost in .gh-dash.yml: defaults.refetchIntervalMinutes: 60 and defaults.preview.open: false. The computed cost is then 7 points at start and 5 points an hour. The pane opens with p. Keep all sections, limits and key bindings.
  2. Correct the numbers in docs/DEVCONTAINER_USAGE.md and in the task file of feat(tools): pin gh-dash and ship .gh-dash.yml for the oldest-first PR queue and issue triage #1882 (a later change must update a task file that it makes stale). Say what is computed and what is measured. Say that the first measurement (+124) is not explained.
  3. Add one test in tests/test_gh_dash_config.py that pins the two values and states the cost they protect.
  4. A person measures on a quiet machine with gh-dash --debug --config .gh-dash.yml and counts the log lines Fetching PRs, Fetching PR , Fetching issues and Fetching latest version. The result goes into the pull request.

regression of #1882, shipped in v0.2.39

Activity

  1. added
    source/agent
    type/bug
    on Oct 22, 2026
  2. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Type: type/bug. The candidate corrects incorrect GraphQL cost values in documentation and configuration.
    • Priority: P1-High. The incorrect costs can lead to exceeding the GitHub budget limit.
    • Value: High. Users will benefit from accurate cost estimates and stable tool operation.
    • Effort: Medium. The changes involve configuration updates, documentation corrections, and adding a test case.
  3. added this to the v0.2.39 milestone on Oct 22, 2026
  4. added a commit that references this issue on Oct 22, 2026
    3700d54
  5. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1926, merged into release/v0.2.39 as 3700d54.

    Cause
    The pin of gh-dash (#1882) shipped .gh-dash.yml with a refresh every 15 minutes and the preview open. The docs said this costs about 20 GraphQL points an hour. The source of gh-dash 4.26.2 does not support that number. It gives a computed cost of 9 points at start and about 28 points an hour. The token has a budget of 5,000 points an hour, and AI agents use the same token.

    Change
    .gh-dash.yml now sets defaults.refetchIntervalMinutes: 60 and defaults.preview.open: false. The computed cost is now 7 points at start and 5 points an hour. The header of the file, docs/DEVCONTAINER_USAGE.md and the task files state the cost and the source of each number. The source gives the request counts. GitHub dry runs give the points of one request.

    A person counted the log lines of one start with the first config on 2026-10-22, on a quiet machine, over 60 seconds. debug.log held 5 lines Fetching PRs, 0 lines Fetching PR , 0 lines Fetching issues and 1 line Fetching latest version. The source study expected 4 section fetches, 1 fetch of the selected row, 0 issue fetches and 1 version check. So the log has one more section fetch than expected and no fetch of the selected row. The cause of the fifth fetch is not confirmed. A probable cause is a fetch of the next page when the window gets focus, for a section that has more matches than its limit. Nobody has confirmed why the fetch of the selected row did not occur.

    The quota counters were not usable. The graphql valu…

    7 file(s) changed.

    How it was verified

    Check runs at f5ae3f3:

    • Audit Defect PR Hardening: skipping
    • Prune PR DevContainer Images: pass
    • zizmor: pass
    • devops-cli: pass
    • bandit: pass
    • CodeQL: pass
    • Analyze (actions): pass
    • Tests & Coverage: pass
    • Rule Pack Tests: pass
    • Changed-Test Independence: pass
    • Fail-to-Pass Self-Check: pass
    • Analyze (python): pass
    • Fail-to-Pass Check: pass
    • Static Analysis: pass
    • Service Image: skipping
    • Dependency Freshness: skipping
    • DevContainer Image: skipping

    Acceptance Criteria of docs/agent/tasks/task-1918-gh-dash-refreshes-hourly-with-the-preview-closed.md:

    • The shipped config refreshes every 60 minutes and starts with the preview closed: test_the_shipped_config_refreshes_hourly_and_starts_with_the_preview_closed. It was red on base with (15, True) == (60, False). A change of only the interval to 15 fails it, and a change of only preview.open to true fails it.
    • The header of .gh-dash.yml states 7 points at start and 5 points an hour. The file holds only ASCII: test_the_shipped_config_holds_only_ascii. The config still breaks no rule of the strict schema, and every other key is as it was.
    • docs/DEVCONTAINER_USAGE.md states the costs, where each number comes from, the first measurement that has no known cause, and the steps to count the requests.
    • The task file of feat(tools): pin gh-dash and ship .gh-dash.yml for the oldest-first PR queue and issue triage #1882 and changelog.d/1882.md read true. They state a refresh every 60 minutes and a closed preview. They keep the first measurement apart from the other numbers.
    • changelog.d/1918.md records the change. This change does not edit CHANGELOG.md or docs/ROADMAP.md.
    • The tests of the changed files pass offline, and no agent started gh-dash. devops ci passes in the pre-push hook before the push.
    • A person counted the requests of one start with the first config (refresh every 15 minutes, preview open). The date was 2026-10-22 and the machine was quiet. The command was gh-dash --debug --config .gh-dash.yml. It stayed open for 60 seconds and then closed. debug.log held 5 lines Fetching PRs, 0 lines Fetching PR , 0 lines Fetching issues and 1 line Fetching latest version.
    • What matched: the source study expected 0 issue fetches and 1 version check. The log shows both. The counted fetches match the computed cost of about 9 points.
    • What did not match: the source study expected 4 section fetches and 1 fetch of the selected row. The log shows 5 section fetches and no fetch of the selected row.
    • Not confirmed: the cause of the fifth section fetch. A probable cause is a fetch of the next page when the window gets focus, for a section that has more matches than its limit. Also not confirmed: why the fetch of the selected row did not occur. The preview may not open at start, or the log text may differ.
    • The quota counters were not usable. The graphql value of devops gh rate-limit went from 51 to 7, and the reset time moved by about 10 seconds. So the rate-limit window rolled between the two reads. The core value moved by +1. Each run of the measuring command costs 1 core point and 1 GraphQL point.
    • The earlier jump of +124 points in 22 seconds cannot be assigned to gh-dash. The counted fetches match the computed cost of about 9 points. The counters are shared with every other tool that uses the token, so they cannot assign a cost to one tool.
    • Pending a person: after the merge, run the same 60-second measurement with the new config (refresh every 60 minutes, preview closed). Send the four counts of Fetching PRs, Fetching PR , Fetching issues and Fetching latest version. Delete debug.log.
    • Pending a person: if wanted, find out why a fifth section fetch happens. List the lines Fetching PRs of debug.log with their queries.
  6. added a commit that references this issue on Oct 23, 2026
    f209f6c
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

    source/agenttype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions