Files
OSIT-AE-API-FastAPI/GEMINI.md
2026-01-16 17:27:27 -05:00

4.2 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.py module.
  • Bootstrap Paradox Solved: Implemented a guest-access exception for site_domain search, allowing the frontend to resolve site context without a JWT.
  • V3 Searchable Fields: Confirmed that searchable_fields are fully implemented in app/object_definitions/ and utilized by app/lib_sql_search.py for 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 JSONResponse from fastapi in app/routers/api.py triggers a circular dependency crash. It is safer to rely on FastAPI's default dict-to-JSON serialization or use mk_resp without explicit JSONResponse typing in that specific file.

Session Summary & Progress (Jan 16, 2026)

This session focused on infrastructure automation and resolving critical environment configuration issues.

  • Aether Field Manager (ae_field_manage.py):
    • Developed a "Vertical Slice" automation tool in ~/agents_sync/scripts/ to handle field additions across DB, SQL Views, Pydantic Models, and Search Registries.
    • Implemented multi-layer safety: Timestamped backups, syntax pre-verification, and mandatory --execute flag.
    • Verified "Dry Run" logic for both person and site objects.
  • Hosted File Path Bugfix:
    • Identified and resolved a "Bootstrap Paradox" in app/lib_config_v3.py where database-stored paths (for production) were overwriting local Docker container paths.
    • Ensured FILES_PATH remains controlled by the container environment variables, restoring functionality to file downloads.

Current To-Do List

1. High Priority & Urgent (UE-AE-01 Orchestration)

  • Real-world test of ae_field_manage.py. (ID: 153357623) - Pending user verification of first field addition.
  • Review codebase investigator report for Aether extension and journal management. (ID: 155435511) - In Progress.

2. Infrastructure & Technical Debt

  • Pydantic V2 Migration: Begin impact analysis for the 400+ validators and .dict() calls.
  • Psutil Container Update: Rebuilding the API image with C-build tools (GCC). (Paused)

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.