6.0 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 Hack/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. - ID Vision Mapping Stability: Resolved a critical conflict in
app/lib_sql_search.pywhere backend-injected integer filters (e.g.,account_id) were being incorrectly mapped to_randomstring columns. Mapping now only occurs for non-integer values. - API Error Transparency: Modified
sql_selectto returnFalseon hard database errors (instead of empty results). Updated the V3 search endpoint to return a500 Internal Server Errorin these cases, preventing "silent failures" where frontend developers would see200 OKwith zero results during system errors. - NULL Logic in Filters: Confirmed that explicit frontend filters like
hide: falsewill FAIL to matchNULLdatabase values in standard SQL equality. It is more robust to rely on the API's built-inhidden=not_hiddenURL parameter, which handles(hide = false OR hide IS NULL)automatically. - V3 Action Router Paradigm: Established a new pattern for specialized binary operations (Upload/Download) under
/v3/action/, keeping the standard/v3/crud/routes clean for JSON metadata. - Vision ID safety Net: Enhanced
lookup_id_random_popto resolve random string IDs found in any*_idfield, ensuring "Vision" style payloads (where IDs are strings) are correctly converted to integers before database insertion even if the*_id_randomfield is missing.
Session Summary & Progress (Jan 22, 2026)
This session focused on migrating and stabilizing the Hosted File management system into the V3 architecture.
- V3 Hosted File Migration (Complete):
- Stabilized Models: Updated
Hosted_File_BaseandHosted_File_Link_Baseto prioritize integer IDs internally while ensuring random string mapping for the frontend. - New Action Router: Implemented
app/routers/api_v3_actions_hosted_file.pycontaining specialized logic for Upload, Download (Streaming), and Relational Cleanup. - Multi-File Upload: Ported and enhanced upload logic to support
List[UploadFile]with automatic SHA256 deduplication and relational linking. - Intelligent Deletion: Implemented orphan check logic; files are only physically removed if
rm_orphan=trueand no remaininghosted_file_linkrecords exist. - Frontend Guide: Updated
V3_FRONTEND_API_GUIDE.mdwith full documentation for the new V3 Action endpoints and synced it toagents_sync.
- Stabilized Models: Updated
- Database Integrity:
- Verified and corrected
hosted_file.account_idtoint(11), resolving a legacy schema mistake. - Verified successful creation and cleanup of test records via new E2E test suite.
- Verified and corrected
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).
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.
📋 Aether API Development Protocol
-
Pre-Flight Check: Verify git status. Ensure all previous working changes are committed to maintain a "known good" state before starting a new cycle.
-
Strategic Plan: Write a concise plan identifying the issue, the specific files to be modified, and the verification steps (including specific curl commands or test scripts).
-
Implementation: Perform atomic code modifications using the replace or write_file tools.
-
Syntax Validation: Run python3 -m py_compile <modified_file> immediately. If syntax errors exist, they must be fixed before proceeding to deployment.
-
Process Cycle: Restart the Docker FastAPI service to apply changes:
- "docker restart aether_container_env-ae_api-2"
-
Empirical Testing:
- Execute the curl commands or test scripts identified in Step 1.
- Inspect the live log stream for regressions:
1 "tail -n 20 ~/OSIT_dev/aether_container_env/logs/ae_api/aether_api.log"
-
Finalize: Once verified, commit the changes with a descriptive message and sync relevant documentation.