SOURCE-003 Promote Core Local Dev Post Execution Review¶
Fecha local: 2026-06-16
Estado: CORE LOCAL-DEV POST-EXECUTION REVIEW PASS
portal_visible = yes
Scope: tenant
tenant_id: alpuntodeventa
Owner: Gabi / Carlos Canu
Fuente de verdad:
docs/tenants/alpuntodeventa/business-observer/design/SOURCE-003-PROMOTE-CORE-LOCAL-DEV-POST-EXECUTION-REVIEW.md
1. Objetivo¶
Revision tecnica post-ejecucion de la promocion RAW -> CORE ya ejecutada para:
- DB:
openclaw_business_observer_dev - RAW:
business_observer.raw_source_003_sales_items - CORE:
business_observer.core_source_003_sales_items - Batch:
1827f887-9499-4579-b4f3-234d54f41f7f
No se escribieron datos. No se ejecuto rollback. No se modifico Python. No se
genero CSV. No se toco MART. No se uso VPS, Docker, OpenClaw, NPM, Portainer,
produccion, sync diaria ni postgres-sandbox.
2. Safe Point¶
| Control | Resultado |
|---|---|
| workspace | C:\APV\openclawai |
| rama | main |
git status --short --branch inicial |
## main...origin/main |
git rev-parse HEAD inicial |
926184e7a21f1abec8c69fa21fbf0d292d5f33e9 |
| ultimo commit inicial | 926184e tools: record source 003 promote core local dev execution |
| decision | SAFE POINT PASS |
3. Alcance Ejecutado¶
Solo se ejecutaron comandos read-only, SELECTs de evidencia y comandos del importer que no habilitan escritura efectiva.
Quedo explicitamente fuera de alcance:
INSERT,COPY,UPDATE,DELETE;- rollback;
promote-core --executecon confirmaciones completas;- cambios Python;
- generacion CSV;
- MART;
- VPS, Docker, OpenClaw, NPM, Portainer;
- push o deploy.
4. Evidencia SELECT Read-Only¶
Consulta independiente ejecutada contra la DB local-dev autorizada:
json
{
"database": "openclaw_business_observer_dev",
"fingerprint": "::1/128:5432|openclaw_business_observer_dev|postgres|PostgreSQL 15.15, compiled by Visual C++ build 1944, 64-bit",
"raw_total_rows": 1886,
"raw_batch_rows": 1886,
"core_total_rows": 1886,
"core_batch_rows": 1886,
"duplicates_core_tenant_line_key": 0,
"duplicates_core_tenant_batch_line_key": 0,
"core_empty_line_key_rows": 0,
"core_empty_source_row_hash_rows": 0,
"core_null_promoted_at_rows": 0,
"core_null_raw_loaded_at_rows": 0,
"raw_null_loaded_at_rows": 0,
"raw_empty_line_key_rows": 0,
"raw_empty_source_row_hash_rows": 0,
"raw_duplicates_tenant_line_key": 0,
"raw_loaded_at_min": "2026-06-15 10:52:21.640546-03",
"raw_loaded_at_max": "2026-06-15 10:52:21.640546-03",
"core_promoted_at_min": "2026-06-16 10:28:46.387898-03",
"core_promoted_at_max": "2026-06-16 10:28:46.387898-03",
"core_tenant_ids": ["alpuntodeventa"],
"core_batch_ids": ["1827f887-9499-4579-b4f3-234d54f41f7f"]
}
Conciliacion de identidad RAW -> CORE:
json
{
"raw_line_hash_aggregate": "100753b045ae23e322606cbd5c2ec964",
"core_line_hash_aggregate": "100753b045ae23e322606cbd5c2ec964",
"raw_minus_core_identity_rows": 0,
"core_minus_raw_identity_rows": 0
}
postgres-sandbox:
json
{
"postgres_sandbox_markers": [],
"postgres_sandbox_blocked": false
}
5. Checks¶
| Check | Esperado | Observado | Resultado |
|---|---|---|---|
| RAW total rows | 1886 |
1886 |
PASS |
| RAW batch rows | 1886 |
1886 |
PASS |
| CORE total rows | 1886 |
1886 |
PASS |
| CORE batch rows | 1886 |
1886 |
PASS |
duplicates_core |
0 |
0 |
PASS |
duplicados tenant_id + line_key CORE |
0 |
0 |
PASS |
duplicados tenant_id + sync_batch_id + line_key CORE |
0 |
0 |
PASS |
line_key vacio CORE |
0 |
0 |
PASS |
source_row_hash vacio CORE |
0 |
0 |
PASS |
promoted_at nulo CORE |
0 |
0 |
PASS |
raw_loaded_at nulo CORE |
0 |
0 |
PASS |
loaded_at nulo RAW |
0 |
0 |
PASS |
| identidad RAW menos CORE | 0 |
0 |
PASS |
| identidad CORE menos RAW | 0 |
0 |
PASS |
sync_enabled |
false |
false |
PASS |
production |
false |
false |
PASS |
postgres-sandbox |
no usado | no observado | PASS |
6. RAW No Modificada¶
RAW conserva el estado post-carga:
raw_total_rows = 1886raw_batch_rows = 1886raw_null_loaded_at_rows = 0raw_empty_line_key_rows = 0raw_empty_source_row_hash_rows = 0raw_duplicates_tenant_line_key = 0raw_loaded_at_min = raw_loaded_at_max = 2026-06-15 10:52:21.640546-03
La conciliacion de identidad confirma que CORE preserva exactamente las claves y hashes RAW para el batch autorizado.
7. Importer Read-Only / Guards¶
| Comando | Resultado |
|---|---|
python -m py_compile scripts/source_003_importer.py |
PASS |
python scripts/source_003_importer.py validate-prepared |
PASS, rows=1886, columns=83, data_written=false, sync_enabled=false |
python scripts/source_003_importer.py promote-core |
FAIL esperado post-ejecucion: CORE row_count 1886 != 0; db_write=false, sql_write=false, data_written=false |
python scripts/source_003_importer.py promote-core --execute |
BLOCKED sin confirmaciones; db_touched=false, db_write=false, sql_executed=false, data_written=false |
El FAIL de promote-core sin --execute es consistente con el contrato
pre-ejecucion: el dry-run esperaba CORE inicial vacia (0) y ahora CORE ya
contiene 1886 filas por la promocion ejecutada.
8. Idempotencia¶
No se reejecuto promote-core --execute con confirmaciones completas porque
esta tarea lo prohibe explicitamente.
Evidencia documental vigente:
docs/tenants/alpuntodeventa/business-observer/design/SOURCE-003-PROMOTE-CORE-LOCAL-DEV-EXECUTION-001.md
registro un reintento con el mismo batch y mismas confirmaciones completas que
quedo:
result = BLOCKED- causa:
CORE row_count 1886 != 0 db_write = falsesql_write = falsedata_written = false- CORE final:
1886
La evidencia SELECT actual confirma que ese guard preservo el estado:
- CORE total sigue en
1886; - CORE batch sigue en
1886; - duplicados por
tenant_id + line_key=0; - duplicados por
tenant_id + sync_batch_id + line_key=0; - identidad RAW -> CORE sin diferencias.
Conclusion de idempotencia: el batch duplicado permanece bloqueado y no hubo duplicacion de registros.
9. Hallazgos¶
- La promocion RAW -> CORE local-dev quedo conciliada en
1886filas. - RAW conserva
1886filas y no muestra evidencia de modificacion posterior. - CORE contiene solo el tenant
alpuntodeventay el batch autorizado. - No hay duplicados por las claves logicas aprobadas.
line_key,source_row_hash,promoted_atyraw_loaded_atestan completos.- Los hashes de identidad RAW y CORE coinciden.
sync_enabled=false.production=false.- No se observo
postgres-sandbox. - No se tocaron Python, CSV, MART, produccion ni sync diaria.
10. Decision¶
text
CORE LOCAL-DEV POST-EXECUTION REVIEW PASS
APTO PARA DISEÑAR MART
NO APTO PARA PRODUCCIÓN
NO APTO PARA SYNC DIARIA
La evidencia local-dev es suficiente para iniciar el diseno MART sobre CORE, pero no habilita produccion ni automatizacion de sync diaria.