4.8 KiB
4.8 KiB
Gemini Added Memories
My Role and Operating Principles
I am the primary orchestrator and main helper for the development of the Unified Aether AI Agent (UE-AE-01). My goal is to facilitate the creation of a single AI entity with total system awareness across MariaDB, FastAPI, SvelteKit, and Docker.
Project Context - Aether API (FastAPI)
- Owner/Developer: Scott Idem (user).
- System Name: Aether (AE).
- Purpose: Events Presentation Management, Events Badge Printing, Leads, Attendee Tracking, Presentation Launcher, Journals, Archives, Posts.
- Current API Version (FastAPI): v4.9.0.
- V3 Implementation: Modern parallel CRUD and Search endpoints under
/v3/crud. - Summary: This project serves as the backend for the Aether system, providing core API functionalities.
Key Technical Learnings (Cumulative)
- Circular Dependencies Fixed: Successfully resolved the fragile startup dependency chain by isolating Auth models and using strictly deferred DB imports in a dedicated
dependencies_v3.pymodule. - Bootstrap Paradox Solved: Implemented a guest-access exception for
site_domainsearch, allowing the frontend to resolve site context without a JWT. - V3 Searchable Fields: Confirmed that
searchable_fieldsare fully implemented inapp/object_definitions/and utilized byapp/lib_sql_search.pyfor dynamic query generation. - Environment Sync Clarification: Critical understanding that the
/home/scott/OSIT_dev/directory is NOT a synchronized directory across different machines (e.g., Workstation vs. Laptop). This means virtual environments and installed dependencies are environment-specific and do not propagate via Syncthing. This is crucial for debugging cross-machine environment issues. - Circular Import Sensitivity: Importing
JSONResponsefromfastapiinapp/routers/api.pytriggers a circular dependency crash. It is safer to rely on FastAPI's default dict-to-JSON serialization or usemk_respwithout explicitJSONResponsetyping in that specific file.
Session Summary & Progress (Jan 15, 2026)
This session focused on a comprehensive modernization of the API's core infrastructure to resolve boot-time circular dependencies and improve maintainability.
- FastAPI Entry Point Modularization:
- Registry Pattern: Created
app/routers/registry.pyto centralize 50+ router registrations, slimming downmain.py. - Lifespan Context: Integrated the
lifespancontext manager inapp/main.pyto manage startup/shutdown tasks cleanly. - Naming Collision Fix: Resolved a critical conflict between the
appinstance and theapp.middlewarepackage by using explicit aliases.
- Registry Pattern: Created
- Database Logic Decoupling:
- Layered Architecture: Split
app/db_sql.pyintolib_sql_core(engine/connection) andlib_sql_crud(high-level helpers). - Dynamic Engine Refresh: Implemented
reconnect_db()to allow the SQLAlchemy engine to update credentials after the initial boot.
- Layered Architecture: Split
- Robust Configuration & Logging:
- Logging Sandbox: Moved
dictConfigtoapp/lib_log_v3.pyand deferred its execution to avoid boot-time traps. - Safe Bootstrap: Created
app/lib_config_v3.pywith a non-fatal fallback mechanism for DB configuration sync.
- Logging Sandbox: Moved
- Architecture Documentation:
- Created
documentation/V3_CORE_ARCHITECTURE.mdto document the new file structure and bootstrap sequence.
- Created
Current To-Do List
1. High Priority & Urgent (UE-AE-01 Orchestration)
- Review codebase investigator report for Aether extension and journal management. (ID: 155435511) - In Progress (awaiting report from codebase_investigator).
- Implement scope expansion to
/home/scott/OSIT_dev/. - Pending registry update.
2. Infrastructure & Technical Debt
- Psutil Container Update: Rebuilding the API image with C-build tools (GCC) to support native system monitoring. (Deferred / Paused)
- Fix ComfyUI Container: Resolve the restart loop in the Ollama/WebUI environment.
- Pydantic V2 Migration: Begin impact analysis for the 400+ validators and .dict() calls.
3. Other Agent Tasks
- Review and process new messages from various agents. (ID: 134908245) - In Progress (Internal gemini_cli task).
- [scott_wks] Perform Initial System Health Audit (ID: 131939030) - Done.
- [API-V3] Implement Error Bubbling and Validation Endpoint (ID: 163752448) - Done.
- [API] Modularize main.py and extract Core Registries - Done Jan 15.
- [API] Stabilize Logging and Configuration Bootstrap - Done Jan 15.
Workflow & Collaboration
- Storage: Critical assets at
/home/scott/OSIT/hosted_files/(Synced via Syncthing). - Agents Sync: Shared documentation and notifications pushed to
~/agents_sync/. - Coding Standards: Adhering to
prompts/coding_standards.md.