Saving notes
This commit is contained in:
25
GEMINI.md
25
GEMINI.md
@@ -24,20 +24,23 @@ I am the **primary orchestrator and main helper** for the development of the **U
|
||||
- **NULL Logic in Filters**: Confirmed that explicit frontend filters like `hide: false` will FAIL to match `NULL` database values in standard SQL equality. It is more robust to rely on the API's built-in `hidden=not_hidden` URL 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_pop` to resolve random string IDs found in any `*_id` field, ensuring "Vision" style payloads (where IDs are strings) are correctly converted to integers before database insertion even if the `*_id_random` field is missing.
|
||||
- **Pydantic Response Exclusion**: Confirmed that `Field(exclude=True)` in Pydantic models is the most robust way to hide internal logistics fields (like `subdirectory_path`) from the client while keeping them available for backend logic.
|
||||
- **V3 Search Security Mapping**: Discovered and fixed a gap where integer IDs (like `event_id`) were not explicitly listed in `searchable_fields` for some objects, preventing valid numeric filters from reaching the database.
|
||||
|
||||
## Session Summary & Progress (Jan 22, 2026)
|
||||
## Session Summary & Progress (Jan 26, 2026)
|
||||
|
||||
This session focused on migrating and stabilizing the Hosted File management system into the V3 architecture.
|
||||
This session focused on stabilizing V3 object definitions and enhancing API privacy for file-related objects.
|
||||
|
||||
* **V3 Hosted File Migration (Complete):**
|
||||
* **Stabilized Models:** Updated `Hosted_File_Base` and `Hosted_File_Link_Base` to prioritize integer IDs internally while ensuring random string mapping for the frontend.
|
||||
* **New Action Router:** Implemented `app/routers/api_v3_actions_hosted_file.py` containing 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=true` and no remaining `hosted_file_link` records exist.
|
||||
* **Frontend Guide:** Updated `V3_FRONTEND_API_GUIDE.md` with full documentation for the new V3 Action endpoints and synced it to `agents_sync`.
|
||||
* **Database Integrity:**
|
||||
* Verified and corrected `hosted_file.account_id` to `int(11)`, resolving a legacy schema mistake.
|
||||
* Verified successful creation and cleanup of test records via new E2E test suite.
|
||||
* **V3 Search Stabilization:**
|
||||
* Updated `event_device` object definitions to include integer ID fields (`id`, `event_device_id`, `account_id`, `event_id`, `event_location_id`) in `searchable_fields`. This resolves issues where lookups by parent IDs were being blocked by the V3 search security layer.
|
||||
* **Privacy & Information Hiding:**
|
||||
* Hiden internal file sharding paths (`subdirectory_path`) from all public-facing API responses.
|
||||
* Implemented this via Pydantic `Field(exclude=True)` in `Hosted_File_Base`, `Event_File_Base`, and `Archive_Content_Base` models.
|
||||
* Removed these fields from `exp_default` and `searchable_fields` metadata to ensure a clean API contract.
|
||||
* **Code Quality:**
|
||||
* Fixed syntax errors (missing commas) in the `hosted_file` object definition within `app/object_definitions/other.py`.
|
||||
* Verified all changes via `py_compile` and service restarts.
|
||||
* Committed all changes to the `development` branch.
|
||||
|
||||
## Current To-Do List
|
||||
|
||||
|
||||
Reference in New Issue
Block a user