feat(service-auto): săpt 1 POC Oracle + module scaffold

- poc/hello_oracle.py: sync connect 33ms, DEV_TIP_DEVIZ enum verified live
- poc/hello_oracle_async.py: async 22ms, gate Correction 9 → sync-facade
- backend/modules/service_auto/{routers,services,schemas,models}: scaffold
- docs/service-auto/week1-notes.md: DX latency + gate decision
- docs/service-auto/TODO-phase2.md: phase 2+ backlog (empty header)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-04-11 16:08:53 +00:00
parent 43484db45e
commit 4162e0711c
9 changed files with 245 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
# Service Auto — Phase 2+ Backlog
Scope wall: prototype = creare comandă only. Everything below = phase 2+.
<!-- Add items as they arise during development -->

View File

@@ -0,0 +1,26 @@
# Săpt 1 Notes — Oracle POC
**Date**: 2026-04-11
## Conectivitate
- Server: `central` (10.0.20.121:1521/ROA, CONTAFIN_ORACLE) — PORT OPEN, direct (no tunnel needed)
- Sync connect: **33ms** | Queries: 0.6-3.3ms ✅
- Async connect_async: **22ms** | Queries: 0.2-0.3ms ✅
## Gate Correction 9 — Decizie
**Decizie: sync-facade pattern** (consistent cu `oracle_pool.py` existent)
Motivare: `oracle_pool.py` folosește deja `oracledb.create_pool()` (sync) + `pool.acquire()` (sync) + `with cursor` (sync) în `async def`. Serviciile service_auto vor urma același pattern pentru consistență arhitecturală. `connect_async` funcționează dar nu aduce beneficii față de sync-facade la latențele măsurate.
## Schema Access
- `MARIUSM_AUTO.DEV_ORDL` — acces OK
- `MARIUSM_AUTO.DEV_TIP_DEVIZ` — enum confirmat (7 tipuri, inch_validare corect)
## Next Steps (Săpt 3)
- Audit grants `ROA_WEB` pe `MARIUSM_AUTO.*`
- Creare SP `SP_CREEAZA_COMANDA_PROTOTIP` în MARIUSM_AUTO (template în tabele-service-auto.md §12.2)
- Auth path: adaugă `MARIUSM_AUTO` company în `.env` + test login JWT end-to-end