Saving things while they work again!!! Still working on adding a special exception or something for site domain search.

This commit is contained in:
Scott Idem
2026-01-07 16:25:18 -05:00
parent cf96d93246
commit caf2868d02
5 changed files with 489 additions and 786 deletions

View File

@@ -41,7 +41,7 @@ I am an interactive CLI agent assisting with software engineering tasks for One
### V3 Architectural Progress (Jan 2026)
- **Modular Object Definitions:** Monolithic `ae_obj_types_def.py` refactored into domain-specific files in `app/object_definitions/` (core, events, journals, orders, cms, lookups, membership, other).
- **Modular Object Definitions:** Monolithic `ae_obj_types_def.py` refactored into domain-specific files in `app/object_definitions/`.
- **Granular Dependencies:** Monolithic `Common_Route_Params` replaced with specialized dependencies in `app/lib_general_v3.py` (AccountContext, Pagination, StatusFilter, Serialization, Delay).
- **Advanced Search (POST):** Implemented `POST /v3/crud/{obj}/search` supporting recursive AND/OR grouping and standardized full-text search via the `q` property.
- **Security Hardening:** Implemented a 5-level recursion depth limit and a field allowlist (`searchable_fields`) for the Search API.
@@ -57,9 +57,8 @@ I am an interactive CLI agent assisting with software engineering tasks for One
### Agent Bridge & Docker Integration
- **Agent Bridge Implementation**: Developed `app/routers/agent_bridge.py` for environment diagnostics.
- **Dependency Management**: Noted `psutil` is missing from the container, causing system usage metrics to fail.
- **Decision**: Holding off on adding `psutil` to minimize extra dependencies; the code fails gracefully for now.
- **MCP Docker Explorer**: Created `mcp_docker_explorer.py` to test MCP server integration.
- **MCP Docker Explorer**: Attempted to run `mcp_docker_explorer.py`, but failed with `ModuleNotFoundError: No module named 'mcp'`.
- **Lesson**: The system python (`/usr/bin/python3`) does not have the `mcp` package installed. We must use the specific virtual environment `env_mcp` (e.g., `./env_mcp/bin/python`) or ensure the package is installed in the active environment.
### V3 CRUD Infrastructure & Search
- **Modular Object Definitions**: Refactored `ae_obj_types_def.py` into modular domain files in `app/object_definitions/`.
@@ -68,18 +67,21 @@ I am an interactive CLI agent assisting with software engineering tasks for One
- Improved standardized full-text search (`q` parameter) with fallback logic for missing columns.
- **Data Integrity & Aliasing**: Fixed aliased field population by enabling `allow_population_by_field_name` in Pydantic models.
### Tool Stability & Recovery Note (Jan 7, 2026)
- **Frequent Hangs:** The agent experienced multiple hangs (18+) when using shell commands or `list_directory`.
- **Recovery Action:** A `NameError: name 'SearchFilter' is not defined` in `app/routers/api_crud_v3.py` was fixed by adding the missing import. This error was triggered by the new account isolation logic in the search endpoint.
- **Verification:** The fix was applied, but verification was interrupted by a tool hang. Verification resumes in the next session.
### Startup Failure Resolution (Jan 7, 2026)
- **Root Cause Identified**: The `app/routers/agent_bridge.py` module was preventing the FastAPI worker from booting, likely due to a missing or incompatible dependency (suspected `psutil` in the Docker environment) or a top-level import issue.
- **Resolution**: Commented out the `agent_bridge` router inclusion in `app/main.py`.
- **Status**: The API server has successfully started.
- **Retrospective**: The previous circular dependency refactoring in `lib_general_v3` and `api_crud_v3` might have been unnecessary or at least wasn't the *primary* blocker, though deferring imports is good practice.
## Current To-Do List
1. **Frontend Integration (Priority: High)**: Coordinate with the frontend agent to ensure they adopt the mandatory JWT authentication pattern.
2. **Routing - Nginx (Priority: High)**: Resolve 404 errors on `/v3/` and `/agent/` routes (Port 8888) by updating the Nginx configuration.
3. **Docker MCP Integration (Priority: Medium)**: Proceed with integrating the Docker MCP server into the Gemini CLI environment.
4. **Specialized Endpoints (Priority: Medium)**: Plan modernization of custom logic (importing, websockets) to match V3 patterns.
5. **Account ID Handling (Priority: Low)**: Address the `x_no_account_id` usage with a more permanent architecture.
1. **Frontend Integration (Priority: Urgent)**: Re-implement the `site_domain` lookup exception.
- *Constraint*: Must allow searching `site_domain` without an `account_id` or JWT.
- *Approach*: Re-apply the `optional` authentication dependency logic to `api_crud_v3.py` and `lib_general_v3.py`, now that the server is stable.
2. **Docker MCP Integration (Priority: High)**: Re-attempt running the MCP explorer using the correct virtual environment path (`./env_mcp/bin/python`) once the API is stable.
3. **Routing - Nginx (Priority: Medium)**: Resolve 404 errors on `/v3/` and `/agent/` routes.
4. **Specialized Endpoints (Priority: Medium)**: Plan modernization of custom logic.
5. **Agent Bridge Repair (Priority: Low)**: Investigate why `agent_bridge.py` crashes the server (check `psutil` availability).
### Workflow & Collaboration
- **`GEMINI.md` Strategy:** The user is creating `GEMINI.md` files in key project directories. Their understanding is that context flows from the current directory up the tree, with `~/.gemini/GEMINI.md` serving as a global catch-all for general memories.