Skip to content

Add max_age_days filter to search_issues - #159

Open
SHEKHAR-Y wants to merge 1 commit into
drkrillo:mainfrom
SHEKHAR-Y:feature/max-age-days-filter
Open

Add max_age_days filter to search_issues#159
SHEKHAR-Y wants to merge 1 commit into
drkrillo:mainfrom
SHEKHAR-Y:feature/max-age-days-filter

Conversation

@SHEKHAR-Y

Copy link
Copy Markdown

What does this PR do?

Filtering the issues on the basis of updated_at so that only issues which are active will be searched, also the max_age_days is inclusive of the boundary to ensure if it is set 0 it will return the issues opened or updated today.

Issues with empty updated_at are excluded when max_age_days is set, since we can't verify the recency of the issue and the whole point of this feature is filtering out the stale issues.

Added 4 new tests covering basic age filtering, inclusive boundary case, empty updated_at exclusion and when max_age_days not passed.

Full suite passes, 100% coverage maintained.

Related Issue

Fixes #155

Checklist

  • [ x ] I read the CONTRIBUTING.md
  • [ x ] I ran the project locally and tested my changes
  • [ x ] I verified my changes are working as expected
  • [ x ] This PR description is written by me, not by AI

@drkrillo drkrillo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @SHEKHAR-Y !

PR is looking good.

Left a minor comment in the code: Inapp/tests/test_mcp_server.py, DatasetManager is imported but never used. Push that one and we are ready to merge. Thanks for the back and forth on the issue, the updated_at call was yours and it was the right one.

import pytest

from mcp.server.mcpserver import MCPServer
from app.core.dataset import DatasetManager

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should leave this import out since it's not used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT]: Let MCP search_issues filter by how old the issue is

2 participants