Files
roa2web-service-auto/docs/service-auto/week2-notes.md
Claude Agent 32aca55c78 feat(service-auto): săpt 3-phase2 — toate ipotezele confirmate + modul funcțional
Backend:
- service_auto module complet: router, service, schemas, 5 teste suites (22/22 passed)
- 5 endpoints: GET /ping, /firme, /tip-deviz, /masini, POST /comenzi
- SP_CREEAZA_COMANDA_PROTOTIP creat în MARIUSM_AUTO (VALID, 5.9ms)
- oracle_pool.py: session_callback backward-compat patch
- ROA_WEB user: grants SP-only confirmate (H3), mariusm_test pool switchat
- pyproject.toml: integration pytest marker înregistrat

Frontend:
- ComandaNoua.vue: date reale din Oracle (firme/tip-deviz/masini), nu hardcodate
- src/modules/service-auto/services/api.js: axios service cu Bearer token
- src/router/index.js: rută /service-auto/comanda-noua

Docs:
- decision-log.md: verdict MERGE, toate 6 ipoteze CONFIRMED
- learnings.md: 7 patterns reutilizabile
- grants-audit.md: arhitectura multi-tenant + proxy auth analysis + V_NOM_FIRME loop
- template-modul-oracle.md: rețetă completă pentru module Oracle noi
- TODO-phase2.md: 7 items concrete

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 09:37:09 +00:00

35 lines
1.2 KiB
Markdown

# Săpt 2 Notes — Oracle OUT Param Probe
**Script**: `poc/async_out_param_probe.py`
**Date**: 2026-04-11
**Status**: PASSED ✅
## Latency (measured 2026-04-11)
| Operation | Time |
|-----------|------|
| connect | 21.9ms |
| CREATE PROCEDURE | 9.2ms |
| callproc (OUT param) | 1.0ms |
| DROP PROCEDURE | 54.6ms |
| **Total** | **87.5ms** |
## OUT Param Result
- Procedure: `MARIUSM_AUTO.test_out(p OUT NUMBER)` sets `p := 42`
- Python: `cursor.var(oracledb.NUMBER)``cursor.callproc(...)``out_var.getvalue()` = **42.0**
- Assert `== 42`: **PASSED**
## Cleanup
- `DROP PROCEDURE MARIUSM_AUTO.test_out` executed successfully
- Cleanup OK ✅ — no residual objects left in schema
## Key Findings
- `oracledb.cursor.var(oracledb.NUMBER)` correctly round-trips Oracle `OUT NUMBER` parameters
- The returned value from `.getvalue()` is a Python `float` (42.0), so `int()` cast is needed for IDs
- `callproc` latency is ~1ms once connected — Oracle OUT params add negligible overhead
- DDL (CREATE/DROP) requires ~10-55ms each — avoid in hot paths
- This pattern matches exactly what `ComandaService.creeaza_comanda()` uses for `out_id_ordl` and `out_nrord`