You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P0/doc-drift] FR-9.1.3 history cap claims 10,000; impl caps at 500; no configurable retention #323
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.
Activity