refactor: remove land records tools, enhance RERA API integration - #3
Conversation
- Remove Mahabhulekh 7/12 extract and property card tools (land_records_tools.py) - Add MahaRERA SPA API with AES encryption for project details fetching - Add geocode_address function to GIS tools - Create dedicated agent.py module for cleaner agent setup - Add comprehensive test suite (30 unit tests) - Update dependencies (pyproject.toml, uv.lock) - Remove ROADMAP.md and land records cache - Update main.py and subagents to reflect tool changes
|
/oc review this PR |
|
Here's my review of this PR: PR Review: refactor: remove land records tools, enhance RERA API integrationOverall AssessmentThe PR is well-structured and achieves its stated goals. The removal of the unreliable Mahabhulekh scraper is reasonable, the new RERA SPA API integration with CryptoJS-compatible encryption is a solid addition, and the test suite is comprehensive. However, there are several issues that should be addressed before merging. Critical Issues1. Duplicated code between
2. Stale references to removed functionality in
And
But the title verifier and land records tools were removed. The 3.
4. Module-level side effect in
Security Concerns5. Hardcoded credentials in
CRYPTOJS_KEY = "sdjhfsdkjgkls74385385"
_PUBLIC_USERNAME = "@maharera_public_view"
_PUBLIC_PASSWORD = "Maharera!@$1"While these appear to be shared public-view credentials (not user-specific), they should be moved to environment variables. The CryptoJS key in particular is a secret that should not be in source control. Minor Issues6. Model change in
7. Token caching is not thread-safe
8. Live tests only, no mocked tool tests All tool-level tests are 9. Integration test URL matching inconsistency
Suggestions
VerdictRequest changes on items #1-3 (duplication, stale text, timeout shadowing) and #5 (hardcoded credentials). The rest are suggestions for follow-up. |
- Deduplicate SYSTEM_PROMPT/ALL_TOOLS: agent.py is now single source of truth - main.py imports from agent.py and removes stale title/land records references - Fix DEFAULT_TIMEOUT_SECS shadowing: use NOMINATIM_TIMEOUT and PMRDA_TIMEOUT - Move init_udcpr_store() out of module scope; add initialize_udcpr_store() function - Move hardcoded MahaRERA credentials to env vars via tools/config.py All tests pass, linting clean.
|
/oc check if the issues you've raised have been fixed now |
|
Here's the status of all 9 review issues: Critical / Requested Changes — All Fixed ✅
Suggestions / Minor — Not Addressed
Issue #9 is a real bug that should be fixed — the test filter should use |
Change test URL filter from 'projectView' to 'public/project/view/' to match the actual URL format used by _extract_project_id function. Fixes tests at: - test_rera_tools.py:149,174 - test_integration.py:164


Summary
This PR refactors the tooling layer by removing the problematic Mahabhulekh land records integration and significantly enhancing the MahaRERA tooling with proper API authentication.
Changes
Removed
Added
Enhanced
Testing
All tests pass:
Migration Notes
The
title-verifiersubagent has been removed from the workflow. Title verification functionality will need to be addressed through alternative means (manual or third-party API) in future iterations.