docs: cleanup stale documentation and fix outdated references

- Delete README-ORACLE-MODES.md (references Docker infra that doesn't exist)
- Delete .claude/HANDOFF.md (completed CI/CD session handoff, no longer needed)
- Fix api/README.md: correct run command to ./start.sh, update test commands
  to use ./test.sh instead of deleted test_app_basic.py/test_integration.py
- Fix scripts/HANDOFF_MAPPING.md: mark deleted scripts as removed
- Remove dead README-ORACLE-MODES.md link from README doc table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-03-25 22:23:21 +00:00
parent bc56befc15
commit a659f3bafb
4 changed files with 11 additions and 161 deletions

View File

@@ -1,150 +0,0 @@
# Oracle Modes Configuration Guide - UNIFIED
## 🎯 Un Singur Dockerfile + Docker Compose
| Oracle Version | Configurație .env | Comandă Build | Port |
|---------------|-------------------|---------------|------|
| 10g (test) | `INSTANTCLIENTPATH=...` | `docker-compose up --build` | 5003 |
| 11g (prod) | `INSTANTCLIENTPATH=...` | `docker-compose up --build` | 5003 |
| 12.1+ (nou) | `FORCE_THIN_MODE=true` | `ORACLE_MODE=thin docker-compose up --build` | 5003 |
---
## 🔧 THICK MODE (Oracle 10g/11g) - DEFAULT
### Configurare .env:
```env
# Uncomment această linie pentru thick mode:
INSTANTCLIENTPATH=/opt/oracle/instantclient_23_9
# Comment această linie:
# FORCE_THIN_MODE=true
```
### Rulare:
```bash
docker-compose up --build -d
curl http://localhost:5003/health
```
---
## 🚀 THIN MODE (Oracle 12.1+)
### Varianta 1 - Prin .env (Recomandat):
```env
# Comment această linie pentru thin mode:
# INSTANTCLIENTPATH=/opt/oracle/instantclient_23_9
# Uncomment această linie:
FORCE_THIN_MODE=true
```
### Varianta 2 - Prin build argument:
```bash
ORACLE_MODE=thin docker-compose up --build -d
```
### Test:
```bash
curl http://localhost:5003/health
```
---
## 🔄 LOGICA AUTO-DETECT
Container-ul detectează automat modul:
1. **FORCE_THIN_MODE=true****Thin Mode**
2. **INSTANTCLIENTPATH** există → **Thick Mode**
3. Build cu **ORACLE_MODE=thin****Thin Mode**
4. Default → **Thick Mode**
---
## 🛠️ COMENZI SIMPLE
### Pentru Oracle 10g/11g (setup-ul tău actual):
```bash
# Verifică .env să aibă:
grep INSTANTCLIENTPATH ./api/.env
# Start
docker-compose up --build -d
curl http://localhost:5003/test-db
```
### Pentru Oracle 12.1+ (viitor):
```bash
# Editează .env: decomentează FORCE_THIN_MODE=true
# SAU rulează direct:
ORACLE_MODE=thin docker-compose up --build -d
curl http://localhost:5003/test-db
```
### Switch rapid:
```bash
# Stop
docker-compose down
# Edit .env (change INSTANTCLIENTPATH ↔ FORCE_THIN_MODE)
# Start
docker-compose up --build -d
```
---
## ⚠️ TROUBLESHOOTING
### Eroare DPY-3010 în Thin Mode:
```
DPY-3010: connections to this database server version are not supported
```
**Soluție:** Oracle este 11g sau mai vechi → folosește thick mode
### Eroare libaio în Thick Mode:
```
Cannot locate a 64-bit Oracle Client library: libaio.so.1
```
**Soluție:** Rebuild container (fix automat în Dockerfile.thick)
### Container nu pornește:
```bash
docker-compose logs
docker-compose down && docker-compose up --build
```
---
## 📊 COMPARAȚIE PERFORMANȚĂ
| Aspect | Thick Mode | Thin Mode |
|--------|------------|-----------|
| Container Size | ~200MB | ~50MB |
| Startup Time | 10-15s | 3-5s |
| Memory Usage | ~100MB | ~30MB |
| Oracle Support | 10g+ | 12.1+ |
| Dependencies | Instant Client | None |
---
## 🔧 DEZVOLTARE
### Pentru dezvoltatori:
1. **Thick mode** pentru compatibilitate maximă
2. **Thin mode** pentru development rapid pe Oracle nou
3. **Auto-detect** în producție pentru flexibilitate
### Testare ambele moduri:
```bash
# Thick pe port 5003
docker-compose -f docker-compose.thick.yaml up -d
# Thin pe port 5004
docker-compose -f docker-compose.thin.yaml up -d
# Test ambele
curl http://localhost:5003/health
curl http://localhost:5004/health
```

View File

@@ -456,7 +456,6 @@ curl -X POST http://localhost:5003/api/dashboard/refresh-invoices
| [docs/oracle-schema-notes.md](docs/oracle-schema-notes.md) | Schema Oracle: tabele comenzi, facturi, preturi, proceduri cheie | | [docs/oracle-schema-notes.md](docs/oracle-schema-notes.md) | Schema Oracle: tabele comenzi, facturi, preturi, proceduri cheie |
| [docs/pack_facturare_analysis.md](docs/pack_facturare_analysis.md) | Analiza flow facturare: call chain, parametri, STOC lookup, FACT-008 | | [docs/pack_facturare_analysis.md](docs/pack_facturare_analysis.md) | Analiza flow facturare: call chain, parametri, STOC lookup, FACT-008 |
| [scripts/HANDOFF_MAPPING.md](scripts/HANDOFF_MAPPING.md) | Matching GoMag SKU → ROA articole (strategie si rezultate) | | [scripts/HANDOFF_MAPPING.md](scripts/HANDOFF_MAPPING.md) | Matching GoMag SKU → ROA articole (strategie si rezultate) |
| [README-ORACLE-MODES.md](README-ORACLE-MODES.md) | Configurare Oracle thick/thin mode cu Docker |
--- ---

View File

@@ -37,17 +37,19 @@ Admin interface si orchestrator pentru importul comenzilor GoMag in Oracle ROA.
```bash ```bash
pip install -r requirements.txt pip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 5003 --reload # INTOTDEAUNA via start.sh din project root (seteaza Oracle env vars)
cd .. && ./start.sh
``` ```
## Testare ## Testare
```bash ```bash
# Test A - fara Oracle (verifica importuri + rute) # Din project root:
python test_app_basic.py ./test.sh ci # Teste rapide (unit + e2e, ~30s, fara Oracle)
./test.sh full # Teste complete (inclusiv Oracle, ~2-3 min)
# Test C - cu Oracle (integrare completa) ./test.sh unit # Doar unit tests
python test_integration.py ./test.sh e2e # Doar browser tests (Playwright)
./test.sh oracle # Doar Oracle integration
``` ```
## Dual Database ## Dual Database

View File

@@ -72,10 +72,9 @@ Cand o comanda are produse complet diferite fata de factura, algoritmul forteaza
- Exemplu: "Lavazza Crema E Aroma Cafea Boabe 1 Kg" vs "LAVAZZA BBE CREMA E AROMA" - Exemplu: "Lavazza Crema E Aroma Cafea Boabe 1 Kg" vs "LAVAZZA BBE CREMA E AROMA"
- Ar putea fi mai precis decat match pe pret, mai ales cand preturile coincid accidental - Ar putea fi mai precis decat match pe pret, mai ales cand preturile coincid accidental
### Tools utile deja existente: ### Tools (nota: scripturile de matching au fost sterse din repo)
- `scripts/compare_order.py <order_nr> <fact_nr>` — comparare detaliata o comanda vs o factura Scripturile `match_all.py`, `compare_order.py`, `fetch_one_order.py` au fost eliminate.
- `scripts/fetch_one_order.py <order_nr>` — fetch JSON complet din GoMag API Strategia de matching descrisa mai sus ramane valida ca referinta conceptuala.
- `scripts/match_all.py` — matching bulk (de refacut cu strategie noua)
## Structura Oracle relevanta ## Structura Oracle relevanta