SOURCE-003 Raw DDL Local Dev Preflight 001¶
Fecha local: 2026-06-15 09:08:41 -03:00
Estado: PREFLIGHT PASS / DDL RAW FORWARD NO EJECUTADO
portal_visible = yes
Scope: tenant
tenant_id: alpuntodeventa
Owner: Gabi / Carlos Canu
Fuente de verdad:
docs/tenants/alpuntodeventa/business-observer/design/SOURCE-003-RAW-DDL-LOCAL-DEV-PREFLIGHT-001.md
1. Objetivo¶
Ejecutar solamente el preflight DDL RAW candidato de SOURCE-003 contra
PostgreSQL local-dev para validar condiciones previas de catalogo antes de
cualquier ejecucion futura y separada del forward.
Destino autorizado:
text
database: openclaw_business_observer_dev
schema: business_observer
Esta tarea no ejecuto forward, rollback, post-checks, CREATE TABLE,
INSERT, UPDATE, DELETE, COPY, carga de datos, sync, VPS, Docker,
OpenClaw, NPM, Portainer, push ni deploy.
2. Safe point¶
| Control | Resultado |
|---|---|
| rama | main |
git status --short |
sin salida |
git rev-parse HEAD |
f7685ca0eed36cbd36618d5c0a8f199e82d20403 |
git rev-parse origin/main |
f7685ca0eed36cbd36618d5c0a8f199e82d20403 |
| ultimo commit observado | f7685ca docs: review source 003 raw ddl candidate |
| decision | SAFE POINT PASS |
3. SQL autorizado ejecutado¶
Se ejecuto unicamente:
text
docs/tenants/alpuntodeventa/business-observer/design/sql/004_source_003_raw_ddl_candidate_preflight.sql
Comando operativo sin secretos:
powershell
C:\Program Files\PostgreSQL\15\bin\psql.exe -X -v ON_ERROR_STOP=1 -h <APV_LOCAL_POSTGRES_ADMIN_HOST> -p <APV_LOCAL_POSTGRES_ADMIN_PORT> -U <APV_LOCAL_POSTGRES_ADMIN_USER> -d openclaw_business_observer_dev -f docs/tenants/alpuntodeventa/business-observer/design/sql/004_source_003_raw_ddl_candidate_preflight.sql
Notas de ejecucion:
| Control | Resultado |
|---|---|
binario psql |
C:\Program Files\PostgreSQL\15\bin\psql.exe |
ON_ERROR_STOP |
SI |
| DB indicada en comando | openclaw_business_observer_dev |
| credenciales | variables locales no versionadas; secretos no impresos |
postgres-sandbox |
NO USADO |
| forward ejecutado | NO |
| rollback ejecutado | NO |
| post-checks ejecutados | NO |
| DDL ejecutado | NO |
| DML ejecutado | NO |
| carga de datos | NO |
4. Resultado del preflight¶
| Check | Observado | Esperado | Resultado |
|---|---|---|---|
current_database |
openclaw_business_observer_dev |
openclaw_business_observer_dev |
PASS |
schema_business_observer_exists |
true |
true |
PASS |
schema_business_observer_owner |
openclaw_bo_admin |
openclaw_bo_admin |
PASS |
required_roles_exist |
3 |
3 |
PASS |
required_roles_nologin/openclaw_bo_admin |
false |
false |
PASS |
required_roles_nologin/openclaw_bo_reader |
false |
false |
PASS |
required_roles_nologin/openclaw_bo_writer |
false |
false |
PASS |
raw_candidate_table_absent_before_forward |
true |
true |
PASS |
pilot_table_is_not_raw_final |
business_observer.source_003_sales_items |
tabla piloto, no RAW final | PASS |
public_schema_privileges_absent |
0 |
0 |
PASS |
preflight_catalog_read_only_no_data_load |
SELECT-only catalog checks; no INSERT/UPDATE/DELETE/COPY/DDL |
sin carga ni cambios de objetos | PASS |
Resultado general:
text
PREFLIGHT PASS
5. Evidencia de alcance¶
| Restriccion | Resultado |
|---|---|
| DB correcta | PASS |
schema business_observer existe |
PASS |
| roles requeridos existen | PASS |
roles requeridos son NOLOGIN |
PASS |
| tabla RAW candidata existe antes del forward | NO |
| politica para tabla RAW existente | no aplica; se observo ausente |
tabla piloto business_observer.source_003_sales_items |
detectada solo como piloto, no RAW final |
| tabla piloto tocada por DDL/DML | NO |
postgres-sandbox usado |
NO |
| secretos impresos | NO |
| cambios en PostgreSQL | NO |
La afirmacion de que la tabla piloto no se toca se basa en el alcance del SQL
ejecutado: el preflight contiene solamente consultas SELECT de catalogo y una
lectura to_regclass sobre
business_observer.source_003_sales_items. No se ejecuto ningun SQL adicional
contra la DB.
6. Bloqueos preservados¶
Siguen bloqueados:
- ejecucion de
004_source_003_raw_ddl_candidate_forward.sql - ejecucion de
004_source_003_raw_ddl_candidate_rollback.sql - ejecucion de
004_source_003_raw_ddl_candidate_post_checks.sql - creacion de
business_observer.raw_source_003_sales_items - carga
load-raw - modificaciones del importer Python
- sync diaria, carga masiva y produccion final
VPS,Docker,OpenClaw,NPM,Portainer- push y deploy
7. Validaciones del repo¶
| Validacion | Resultado |
|---|---|
git diff --check |
PASS |
.venv-portal\Scripts\mkdocs.exe build --strict |
PASS |
8. Decision¶
text
PREFLIGHT PASS / DDL RAW FORWARD NO EJECUTADO
El entorno local-dev cumple las condiciones previas verificadas por el
preflight RAW candidato. Esto no crea la tabla RAW, no habilita carga de datos
y no autoriza load-raw. Cualquier forward futuro requiere una tarea separada
con SAFE POINT nuevo, autorizacion explicita y alcance propio.