From 55033d07494021271cfa0021bb03796dcbfe242a Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Tue, 6 Jan 2026 18:03:57 -0500 Subject: [PATCH] feat(events): add conference to searchable fields and update progress --- GEMINI.md | 5 ++++- app/object_definitions/events_general.py | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/GEMINI.md b/GEMINI.md index 3abd436..53caf23 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -33,6 +33,9 @@ I am an interactive CLI agent assisting with software engineering tasks for One - **Root Cause:** If `logging.config.dictConfig` fails (e.g., due to missing `/logs` directories in Docker), the entire application crashes. - **Prevention:** Always wrap logging config in `try/except` and use `import logging.config` explicitly. - **Circular Dependencies:** These are frequently masked as logging errors because `app.log` is imported very early in most files. Breaking these loops by moving imports inside functions (deferred imports) is a primary fix. +- **Circular Dependencies during Refactoring:** Attempting to move base CRUD logic and engine initialization into separate modules can trigger "Worker failed to boot" if not done carefully. + - **Issue:** Moving `db` and `engine` to a separate file like `db_connection.py` often creates circular loops with `db_sql.py` or `log.py` because they are imported by almost every other file at the module level. + - **Resolution:** A "Facade Pattern" was used for `db_sql.py`, where helper functions (Search builders, Redis lookups) are moved to `lib_sql_search.py` and `lib_redis_helpers.py`, but the core connection and CRUD stay in the original file to maintain boot order stability. - **V3 API Dependencies:** Standardized `Response` injection should use plain type hints (e.g., `response: Response`) to avoid router initialization failures. - **Pydantic Compatibility:** The current environment uses Pydantic v1.10. Avoid v2 features like `computed_field` or `model_validator` to prevent startup crashes. @@ -65,7 +68,7 @@ I am an interactive CLI agent assisting with software engineering tasks for One 1. **Docker Environment Insight Improvements (Priority: High)**: Implement methods/endpoints to give the agent more insight into the actual Docker runtime environment. 2. **Security - Field Allowlists (Priority: High)**: Finish populating `searchable_fields` for all remaining object definitions. -3. **Refactoring - Modularize `db_sql.py` (Priority: Medium)**: Given the file's size (>2200 lines), plan to split it into functional modules (Search Builder, Core CRUD, Redis Helpers) to improve maintainability and agent reliability. +3. **Refactoring - Modularize `db_sql.py` (Priority: Done/Low)**: Successfully implemented a facade pattern, moving search builders and Redis helpers to modular files. This reduced `db_sql.py` by nearly 500 lines while preserving stability. Further modularization of core CRUD should only be attempted if stability risks are mitigated. 4. **Specialized Endpoints (Priority: Medium)**: Plan modernization of custom logic (importing, websockets) to match V3 patterns. 5. **Security - Authentication (Priority: High)**: Continue refining and enforcing JWT-based authentication across all V3 endpoints. diff --git a/app/object_definitions/events_general.py b/app/object_definitions/events_general.py index 94062e0..508b2e0 100644 --- a/app/object_definitions/events_general.py +++ b/app/object_definitions/events_general.py @@ -43,9 +43,10 @@ events_general_obj_li = { ], # V3 Search Security: 'searchable_fields': [ - 'event_id_random', 'account_id_random', 'event_code', 'type', 'name', - 'summary', 'description', 'format', 'timezone', 'location_text', - 'status', 'enable', 'hide', 'priority', 'group', 'created_on', 'updated_on' + 'event_id_random', 'account_id_random', 'event_code', 'conference', + 'type', 'name', 'summary', 'description', 'format', 'timezone', + 'location_text', 'status', 'enable', 'hide', 'priority', 'sort', + 'group', 'notes', 'created_on', 'updated_on' ], }, 'event_file': {