Skip to content

Refactor graph operation handling and deduplicate Janitor graph tool#45

Merged
ChrisCoder9000 merged 2 commits intodevelopmentfrom
cursor/codebase-structural-improvements-baa3
Apr 12, 2026
Merged

Refactor graph operation handling and deduplicate Janitor graph tool#45
ChrisCoder9000 merged 2 commits intodevelopmentfrom
cursor/codebase-structural-improvements-baa3

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented Mar 30, 2026

Summary

  • Centralized graph operation result serialization in a reusable chain-of-responsibility module at src/adapters/graph_operation_result_serializer.py.
  • Updated GraphAdapter.execute_operation to consistently serialize backend results via the shared serializer facade.
  • Aligned graph client contracts by changing execute_operation return type to Any in src/adapters/interfaces/graph.py and src/lib/neo4j/client.py.
  • Removed duplicate Janitor tool implementation by deleting src/core/agents/tools/janitor_agent/JanitorAgentExecuteGraphOperationTool.py and cleaning imports/exports.
  • Simplified redundant exception handling in src/core/agents/janitor_agent.py.
  • Removed duplicate serialization logic from src/core/agents/tools/kg_agent/KGAgentExecuteGraphOperationTool.py so serialization is handled in one place.

Tests

  • Added graph serialization regression tests in tests/test_architecture_refactors.py.
  • Added static deduplication checks for Janitor tool imports/exports in tests/test_static_hardening_refactors.py.
  • Ran python3 -m unittest tests.test_static_hardening_refactors -v (pass).
  • Attempted python3 -m unittest tests.test_architecture_refactors -v but environment is missing runtime deps (pydantic module not installed).

Notes

  • Commit: f12f04f
  • Branch: cursor/codebase-structural-improvements-baa3
Open in Web View Automation 

…tools

Co-authored-by: Christian <ChrisCoder9000@users.noreply.github.com>
@ChrisCoder9000 ChrisCoder9000 marked this pull request as ready for review April 12, 2026 11:33
@ChrisCoder9000 ChrisCoder9000 merged commit 4eaffc9 into development Apr 12, 2026
@ChrisCoder9000 ChrisCoder9000 deleted the cursor/codebase-structural-improvements-baa3 branch April 18, 2026 12:23
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.

2 participants