Skip to content

SuggestionStore max-age and max-count env values should have upper caps #2915

Description

@Widthdom

Summary

SuggestionStore accepts positive max-age and max-count environment values without documented upper bounds.

Evidence

SuggestionStore.ResolveMaxAge parses MaxAgeDaysEnvironmentVariable as a positive int and immediately returns TimeSpan.FromDays(days). ResolveMaxCount accepts any positive int as the retained suggestion count.

Impact

An extreme max-age can throw during TimeSpan.FromDays, and an extreme max-count can prevent pruning from bounding the store size as intended.

Expected

Clamp or reject max-age and max-count values above documented limits, and fall back safely on invalid or overflowing values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions