Saving updated notes.

This commit is contained in:
Scott Idem
2026-01-22 19:05:22 -05:00
parent 2e4fbfc8ab
commit 061c153061
2 changed files with 70 additions and 134 deletions

View File

@@ -22,19 +22,22 @@ I am the **primary orchestrator and main helper** for the development of the **U
- **ID Vision Mapping Stability**: Resolved a critical conflict in `app/lib_sql_search.py` where backend-injected integer filters (e.g., `account_id`) were being incorrectly mapped to `_random` string columns. Mapping now only occurs for non-integer values.
- **API Error Transparency**: Modified `sql_select` to return `False` on hard database errors (instead of empty results). Updated the V3 search endpoint to return a `500 Internal Server Error` in these cases, preventing "silent failures" where frontend developers would see `200 OK` with zero results during system errors.
- **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.
## Session Summary & Progress (Jan 21, 2026)
## Session Summary & Progress (Jan 22, 2026)
This session focused on stabilizing the V3 search engine and enhancing the "ID Vision" developer experience.
This session focused on migrating and stabilizing the Hosted File management system into the V3 architecture.
* **V3 Search Engine Enhancements:**
* **Comprehensive ID Vision:** Expanded `vision_fields` mapping to include almost all major Aether objects (Event, Journal, Order, Product, etc.), allowing clean names in frontend filters.
* **Error Handling Refactor:** Standardized SQL error bubbling to return `500` status codes with DB details instead of misleading `200` successes.
* **Status Filter Consistency:** Added `not_enabled` alias for the `enabled` status parameter to align with `not_hidden`.
* **Object Definitions:**
* Whitelisted clean ID names (e.g., `event_id`, `account_id`) in `searchable_fields` for Events, Badges, and Journals to support the new mapping logic.
* **Database Synchronization:**
* Verified and resolved `v_journal_entry` missing column errors after user updated the view to include `account_id`.
* **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.
## Current To-Do List
@@ -69,4 +72,4 @@ This session focused on stabilizing the V3 search engine and enhancing the "ID V
* Inspect the live log stream for regressions:
1 "tail -n 20 ~/OSIT_dev/aether_container_env/logs/ae_api/aether_api.log"
6. Finalize: Once verified, commit the changes with a descriptive message and sync relevant documentation.
6. Finalize: Once verified, commit the changes with a descriptive message and sync relevant documentation.