Skip to content

test: add regression test for RAG query endpoint ensuring time import is present#899

Open
Pcmhacker-piro wants to merge 1 commit into
SdSarthak:mainfrom
Pcmhacker-piro:fix/rag-query-time-import-test
Open

test: add regression test for RAG query endpoint ensuring time import is present#899
Pcmhacker-piro wants to merge 1 commit into
SdSarthak:mainfrom
Pcmhacker-piro:fix/rag-query-time-import-test

Conversation

@Pcmhacker-piro
Copy link
Copy Markdown

Summary
Closes #736
The import time was added in a prior commit to fix a NameError from time.monotonic() in the RAG query endpoint. This PR adds a dedicated regression test suite (backend/tests/test_rag_query.py) that would catch this class of import errors in the future.
Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor
  • Tests
  • Infra / CI
    Checklist
  • I have read CONTRIBUTING.md
  • My code follows the project style
  • I have added/updated tests where relevant
  • Tests/lint pass locally (if available)
  • I have not committed .env or any secrets
  • I have updated documentation if needed
    Screenshots (if UI change)
    N/A
    CHANGED FILES
  • backend/tests/test_rag_query.py (new file, 129 lines)
    COMMITS
  • e4f9821 - test: add regression test for RAG query endpoint ensuring time import is present
    TESTING PERFORMED
    cd /tmp/aegisai/backend && python3 -m pytest tests/test_rag_query.py -v --no-header

Result: 4 passed in 0.20s

FINAL STATUS

  • Branch Name: fix/rag-query-time-import-test (also pushed to fix/rag-query-regression-test)
  • Commit Hash: e4f9821
  • PR Created: No (token lacks createPullRequest scope)
  • Ready for Review: Yes

@Pcmhacker-piro
Copy link
Copy Markdown
Author

@SdSarthak

the checks have passed. Could you please review and approve the pending workflows when you have a chance? Thank you!

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.

RAG query crashes because time is not imported

1 participant