Skip to content

[P0/doc-drift] FR-9.1.3 history cap claims 10,000; impl caps at 500; no configurable retention #323

Closed

Description

@EVWorth

Context

DESIGN_REQUIREMENTS FR-9.1.3 (docs/design/DESIGN_REQUIREMENTS.md:544) advertises a configurable history retention with a 10,000-entry default. ARCHITECTURE §9.4 (docs/design/ARCHITECTURE.md:1581) lists historyStore.ts as "last ~200 queries per session". The implementation (src/stores/historyStore.ts:24) hardcodes a MAX_ENTRIES = 500 constant with no user-configurable retention.

Problem

Three different numbers in three places (10,000 / 200 / 500) and no way for the user to change the cap. The 500-entry cap is what localStorage can safely hold per the architecture note, but neither the spec nor the architecture doc reflects that compromise.

Files

  • src/stores/historyStore.ts:24
  • docs/design/ARCHITECTURE.md:1581
  • docs/design/DESIGN_REQUIREMENTS.md:544

Expected

Single canonical cap value documented across spec, architecture, and code. Ideally user-configurable via a settings UI (default 500 to respect localStorage quota).

Proposed fix

Scope M — bump MAX_ENTRIES to 5,000 (well within localStorage 5–10 MB limit) and surface a "History size limit" setting in FormatterSettingsDialog. Or add a clear doc comment in historyStore.ts and downgrade FR-9.1.3 to [partial] in the spec.

Acceptance

A user can change the cap via a settings UI; the test suite verifies the cap is configurable; the spec, architecture, and code agree on the default value.

Needs human verify

yes (quota-aware sizing)

Activity

  1. added
    audit
    severity/p0
    kind/doc-drift
    area/history
    on Jul 31, 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

    area/historyauditkind/doc-driftseverity/p0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions