Skip to content

Add integration tests for ChatGPTAgent and ContradictionAgent #8

@blackboxprogramming

Description

@blackboxprogramming

Description

Lucidia currently lacks integration tests that verify the interplay between the conversational agent, memory manager, and contradiction detection. Unit tests cover individual functions, but we need to validate that the system behaves correctly as a whole.

Proposed work

  • Write integration tests using pytest that simulate a conversation with ChatGPTAgent.evaluate and verify that memory entries include input, generated response, and sentiment classification.
  • After the conversation, call ContradictionAgent.analyze to detect contradictions and ensure they are recorded when present.
  • Use fixtures to isolate memory and contradictions storage in temporary files/directories, preventing cross-test contamination.
  • Include test cases with and without contradictions, verifying that contradictions are only logged when appropriate and that list_contradictions returns the expected results.
  • Place the tests in a tests/integration/ directory and update the README's testing section with instructions on running them.

Acceptance criteria

  • Integration tests pass successfully and cover the conversation workflow end-to-end.
  • The tests confirm that memory persistence and sentiment tagging work correctly and that contradictions are detected and logged appropriately.
  • Temporary resources created during testing are cleaned up after the tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions