|
| 1 | +# Cleanup Plan for Temporary Workarounds |
| 2 | + |
| 3 | +The following actions should be executed once the development environment consistently provides internet access and all |
| 4 | +optional dependencies can be installed. Each item references the affected files, the temporary workaround currently in |
| 5 | +place, and the exact remediation steps required to bring the implementation in line with production expectations. |
| 6 | + |
| 7 | +## Compatibility Layers |
| 8 | + |
| 9 | +### Replace Pydantic Shim (Completed) |
| 10 | +- **Files**: `meshmind/_compat/pydantic.py`, modules importing from `meshmind._compat.pydantic`. |
| 11 | +- **Status**: Completed – the shim has been removed, `pydantic>=2.11` is a required dependency, and all models/tests now consume the official APIs directly. |
| 12 | + |
| 13 | +### Retire FastAPI Stub (Completed) |
| 14 | +- **Files**: `meshmind/api/rest.py`, `meshmind/api/service.py`, `docs/api.md`, `SETUP.md`. |
| 15 | +- **Status**: Completed – the REST layer now requires FastAPI, tests rely on |
| 16 | + `fastapi.testclient.TestClient`, and documentation reflects the production |
| 17 | + stack. |
| 18 | + |
| 19 | +### Replace gRPC Dataclass Shim (Completed) |
| 20 | +- **Files**: `meshmind/api/grpc.py`, `meshmind/protos/memory_service.proto`, `meshmind/tests/test_service_interfaces.py`, `docs/api.md`. |
| 21 | +- **Status**: Completed – protobuf definitions now live under `meshmind/protos`, generated modules back the Python stub, setup scripts install `grpcio`/`grpcio-tools`, and tests exercise the canonical schema. |
| 22 | + |
| 23 | +### Promote gRPC Server Implementation |
| 24 | +- **Files**: `meshmind/api/grpc.py`, `meshmind/api/grpc_server.py`, CLI entry points, |
| 25 | + integration tests. |
| 26 | +- **Current State**: An asyncio server helper and CLI (`meshmind serve-grpc`) now |
| 27 | + run the service; Docker Compose provisions a gRPC container. Integration tests |
| 28 | + against a live server remain outstanding. |
| 29 | +- **Action**: |
| 30 | + 1. Add integration tests (possibly using `grpc.aio.insecure_channel`) that cover |
| 31 | + ingestion, search, and memory counts against the running server. |
| 32 | + 2. Publish generated client artifacts for downstream consumers once |
| 33 | + infrastructure is available. |
| 34 | + |
| 35 | +## Task Scheduling Workarounds |
| 36 | + |
| 37 | +### Remove Celery Dummy App and Beat Fallback (Completed) |
| 38 | +- **Files**: `meshmind/tasks/celery_app.py`, `meshmind/tasks/scheduled.py`. |
| 39 | +- **Status**: Completed – Celery is a required dependency, the runtime imports the |
| 40 | + real app/beat scheduler, and docker-compose stacks provision Redis for workers. |
| 41 | + |
| 42 | +## Testing Fakes |
| 43 | + |
| 44 | +### Evaluate Graph/Embedding/Test Fakes |
| 45 | +- **Files**: `meshmind/testing/fakes.py`, `meshmind/tests/conftest.py`, `meshmind/tests/test_*`. |
| 46 | +- **Current State**: In-memory drivers and dummy encoders enable offline unit tests. |
| 47 | +- **Action**: |
| 48 | + 1. Keep unit-test fakes for isolation but ensure parallel integration suites use live services. |
| 49 | + 2. Document expectations in `docs/testing.md` and mark fakes clearly as test-only utilities. |
| 50 | + 3. Remove any production code paths that accidentally import fakes. |
| 51 | + |
| 52 | +### Replace Memgraph Client Mock |
| 53 | +- **Files**: `meshmind/tests/test_memgraph_driver.py`. |
| 54 | +- **Current State**: Monkeypatches a fake `mgclient` module for driver tests. |
| 55 | +- **Action**: |
| 56 | + 1. Install `pymgclient` and run tests against a dockerized Memgraph instance. |
| 57 | + 2. Retain the fake only for negative/offline coverage; guard it behind an explicit fixture flag. |
| 58 | + |
| 59 | +## Observability and Telemetry |
| 60 | + |
| 61 | +### Confirm Logging Metrics Alignment |
| 62 | +- **Files**: `meshmind/core/observability.py`, `meshmind/pipeline/*`, `docs/telemetry.md`. |
| 63 | +- **Current State**: Logging/metrics rely on standard library fallbacks. |
| 64 | +- **Action**: |
| 65 | + 1. Integrate preferred observability stack (e.g., OpenTelemetry) once dependencies are greenlit. |
| 66 | + 2. Remove or demote placeholders that mimic external exporters. |
| 67 | + |
| 68 | +## Tooling and Automation |
| 69 | + |
| 70 | +### Finalize Setup Scripts |
| 71 | +- **Files**: `run/install_setup.sh`, `run/maintenance_setup.sh`. |
| 72 | +- **Current State**: Scripts install packages opportunistically. |
| 73 | +- **Action**: |
| 74 | + 1. Review installed package list after environment unblock and remove conditional guards. |
| 75 | + 2. Ensure scripts configure CLI tools (e.g., `grpcurl`, `neo4j-admin`) that were previously skipped offline. |
| 76 | + |
| 77 | +### Lock Dependency Graph |
| 78 | +- **Files**: `pyproject.toml`, `uv.lock`. |
| 79 | +- **Current State**: Lockfile may exclude previously unavailable packages. |
| 80 | +- **Action**: |
| 81 | + 1. Regenerate `uv.lock` after all dependencies are installed. |
| 82 | + 2. Commit the updated lockfile and note differences in `CHANGELOG.md`. |
| 83 | + |
0 commit comments