Saltar a contenido

SOURCE-003 Runner Status DB 001

Fecha local: 2026-06-15

Estado: RUNNER STATUS DB PASS / VERDE

portal_visible = yes

Scope: tenant

tenant_id: alpuntodeventa

Owner: Gabi / Carlos Canu

Fuente de verdad: docs/tenants/alpuntodeventa/business-observer/design/SOURCE-003-RUNNER-STATUS-DB-001.md

1. Objetivo

Ejecutar exclusivamente el modo read-only status del runner SOURCE-003 contra la DB dedicada local para verificar la salud del piloto ya cargado.

Alcance prohibido y no ejecutado:

  • load
  • full
  • rollback
  • candidate load
  • COPY
  • INSERT
  • MERGE
  • UPSERT
  • DELETE
  • TRUNCATE
  • sync diaria
  • carga masiva
  • produccion final
  • VPS / Docker / OpenClaw / NPM
  • push / deploy

2. SAFE POINT

Control Resultado
rama main
git status -sb ## main...origin/main
git rev-parse HEAD d3112b9218192a2993400517136bc61822854666
git ls-remote origin main d3112b9218192a2993400517136bc61822854666 refs/heads/main
ultimo commit d3112b9 tools: define source 003 runner status semantics
decision SAFE POINT PASS

3. Revision previa segura

Comandos seguros ejecutados:

  • python -m py_compile scripts/source_003_pilot_load_runner.py
  • python scripts/source_003_pilot_load_runner.py --help
  • python scripts/source_003_pilot_load_runner.py plan --dry-run
  • python scripts/source_003_pilot_load_runner.py validate-files --dry-run
  • python scripts/source_003_pilot_load_runner.py dry-run

Resultado:

  • py_compile: PASS
  • --help: PASS
  • plan --dry-run: PASS
  • validate-files --dry-run: PASS
  • dry-run: PASS

Telemetria observada en modos seguros:

  • postgresql_touched = false
  • postgresql_touch_attempted = false
  • fingerprint_probe_attempted = false
  • fingerprint_probe_completed = false
  • fingerprint_probe_failed = false
  • sql_script_executed = false
  • sql_executed = false

4. Entorno validado sin secretos

Controles:

Control Resultado
DB autorizada openclaw_business_observer_dev
tabla autorizada business_observer.source_003_sales_items
CSV autorizado existe PASS
sha256 CSV autorizado 3f16a957a79fc84d4ca37930988287cb81f05166210d057fcf8b45007f184afe
filas CSV 1886
batch CSV 1827f887-9499-4579-b4f3-234d54f41f7f
fecha CSV 2026-06-09
psql disponible en PATH inicial NO
psql.exe instalado localmente C:\Program Files\PostgreSQL\15\bin\psql.exe
variables APV_BO_* exactas en entorno inicial NO

Notas operativas:

  • psql.exe se agrego solo al PATH del proceso del comando;
  • .env local no se modifico;
  • las variables esperadas por el runner se mapearon solo en memoria del proceso desde la configuracion local existente;
  • no se imprimieron passwords, PGPASSWORD ni connection strings completas.

5. Fingerprint observado

Fingerprint aprobado y observado por el runner:

text ::1/128:5432|openclaw_business_observer_dev|postgres|PostgreSQL 15.15, compiled by Visual C++ build 1944, 64-bit

Campos no sensibles:

Campo Observado
server_addr ::1/128
server_port 5432
database openclaw_business_observer_dev
user postgres
server_version 15.15

Resultado:

  • fingerprint_probe_attempted = true
  • fingerprint_probe_completed = true
  • fingerprint_probe_failed = false
  • decision fingerprint: PASS

6. Comando del runner ejecutado

Preparacion del proceso antes del comando:

  • carga de .env local en memoria;
  • agregado de C:\Program Files\PostgreSQL\15\bin al PATH del proceso;
  • mapeo temporal de credenciales locales hacia APV_BO_LOCAL_POSTGRES_USER/PASSWORD;
  • carga temporal de APV_BO_EXPECTED_POSTGRES_* con la evidencia de fingerprint aprobada.

Comando ejecutado, sin secretos:

text python scripts/source_003_pilot_load_runner.py status --execute --i-understand-this-touches-db --confirm-database openclaw_business_observer_dev --confirm-batch 1827f887-9499-4579-b4f3-234d54f41f7f --confirm-csv-sha256 3f16a957a79fc84d4ca37930988287cb81f05166210d057fcf8b45007f184afe --confirm-instance-fingerprint "<fingerprint aprobado>"

No se inventaron flags: se usaron solamente las flags publicadas por python scripts/source_003_pilot_load_runner.py status --help.

7. Resultado status

Payload principal observado:

  • command = status
  • result = PASS
  • command_family = status
  • semantic_mode = verify-existing-pilot
  • read_only_mode = true
  • write_enablement = none
  • postgresql_touch_attempted = true
  • postgresql_touched = true
  • fingerprint_probe_attempted = true
  • fingerprint_probe_completed = true
  • fingerprint_probe_failed = false
  • sql_script_executed = true
  • sql_executed = true
  • psql_bin = psql.EXE
  • returncode = 0
  • stderr_line_count = 0

SQL ejecutado por el runner:

text docs/tenants/alpuntodeventa/business-observer/design/sql/004_source_003_dedicated_db_pilot_load_post_checks.sql

Extracto saneado del runner:

text current_database | openclaw_business_observer_dev | openclaw_business_observer_dev | t pilot_batch_row_count | 1886 | 1886 | t

8. Filas verificadas

Control Observado Esperado Resultado
filas del batch piloto 1886 1886 PASS
batch 1827f887-9499-4579-b4f3-234d54f41f7f 1827f887-9499-4579-b4f3-234d54f41f7f PASS
fecha esperada 2026-06-09 2026-06-09 PASS

Interpretacion:

  • el piloto ya cargado conserva exactamente 1886 filas del batch autorizado;
  • el status read-only es PASS funcional;
  • este PASS no habilita load, full ni rollback.

9. Confirmacion de no modificacion de datos

Control Resultado
load ejecutado NO
full ejecutado NO
rollback ejecutado NO
candidate load ejecutado NO
COPY ejecutado NO
INSERT ejecutado NO
MERGE ejecutado NO
UPSERT ejecutado NO
DELETE ejecutado NO
TRUNCATE ejecutado NO
modificacion de datos NO

La unica interaccion DB fue el probe de fingerprint y el SQL autorizado de post-checks usado por status / verify-existing-pilot.

10. Decision

RUNNER STATUS DB PASS / VERDE

Motivo:

  • SAFE POINT exacto confirmado;
  • validaciones locales seguras pasaron sin tocar PostgreSQL;
  • fingerprint real completado;
  • status ejecuto el SQL read-only autorizado con returncode = 0;
  • pilot_batch_row_count = 1886;
  • batch autorizado confirmado;
  • no hubo carga, rollback ni modificacion de datos.