Skip to content

board snapshot caching — a dispatching tick runs ~3 full-board GraphQL snapshots per ticket #25

Closed

Description

@SSFSKIM

What

implement-dispatch.sh's _ticket_exports and _slots_used each take a fresh full-board snapshot (_board.snapshot() — one GraphQL call over every issue), and the sweep's own pass takes another. Net: a dispatching tick costs roughly three snapshots per dispatched ticket on top of the tick's own.

Flagged as a non-blocking nit in the PR #23 pre-merge review; the cost is annotated in the script (skills/implementing-tickets/scripts/implement-dispatch.sh, comment above _ticket_exports).

Why it can wait

Harmless at the current operating point: 5-minute cadence, ~300-issue board. GraphQL rate budget and tick latency are both far from any limit.

When to act

If the board grows ~10× (or tick cadence tightens), add snapshot caching — e.g. take one snapshot per tick and pass it to both helpers, or a short-TTL file cache keyed by tick. The single-authority predicate (_board.py) stays the one place eligibility is computed.

Activity

  1. added
    tech-debt
    on Jul 18, 2026
  2. SSFSKIM commented on Jul 18, 2026

    @SSFSKIM
    OwnerAuthor

    Tracked under the tech-debt parent #26.

  3. SSFSKIM commented on Aug 20, 2026

    @SSFSKIM
    OwnerAuthor

    Already fixed on main — closing as done, not deferred.

    _board.py now carries a two-layer snapshot cache (skills/issue-tracker/scripts/_board.py:501):

    • a per-process memo (_snapshot_cache), and
    • an opt-in cross-process file cache keyed by BOARD_SNAPSHOT_CACHE, with a TTL, an atomic write, and a read that degrades to a fresh fetch on any cache error rather than failing.

    execute-dispatch.sh sets it once per sweep tick and invalidates it after every spawn (line 920) — the right scope, since a spawn is exactly what makes a snapshot stale. Triggered single-ticket dispatches never set the env var and stay always-fresh. The cost comment above _ticket_exports (line 473) records the new arithmetic: 1 + spawns fetches per tick instead of roughly four per queued candidate.

    Coverage exists too: tests/issue-tracker/test-snapshot-cache.sh is hermetic and asserts, among others, "sweep over 5 eligible tickets = exactly one GraphQL fetch". Verified passing on main today.

    The "when to act" trigger this issue named — board grows ~10x — is therefore already met and passed.

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

    tech-debt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions