From 1de41b5055dbcda3d4800b33cfe65dd98cf754c0 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Thu, 6 Aug 2026 14:39:49 +0900 Subject: [PATCH] PHASE-1-SHADOW-RUN: record production schema preflight --- .../CURRENT/CATALOGS/WBS_PROGRESS_TRACKER.csv | 2 +- .../PHASE-1_PRODUCTION_PREFLIGHT_20260806.md | 48 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 docs/CURRENT/PHASE-1_PRODUCTION_PREFLIGHT_20260806.md diff --git a/docs/CURRENT/CATALOGS/WBS_PROGRESS_TRACKER.csv b/docs/CURRENT/CATALOGS/WBS_PROGRESS_TRACKER.csv index a4ddb119..0aaa5504 100644 --- a/docs/CURRENT/CATALOGS/WBS_PROGRESS_TRACKER.csv +++ b/docs/CURRENT/CATALOGS/WBS_PROGRESS_TRACKER.csv @@ -24,4 +24,4 @@ AEG-X-011,S4,Cross,Golden vector 고도화,BLOCKED,TBD,"AGENTS.md: Algorithm cha AEG-VS-09-01,S4,VS-09,BuildEvidenceSnapshot,BLOCKED,TBD,"CLAUDE.md: Evidence requires Phase 1 results",PM/Architect,"Gate 2 prerequisite. Blocked by Phase 1." AEG-VS-10-01,S4,VS-10,GenerateSellDecision,BLOCKED,TBD,"CLAUDE.md: Model must pass PBO/DSR validation",PM/Architect,"Gate 3 prerequisite. Blocked by Phase 1." AEG-VS-19-01,S5,VS-19,RunFrozenBacktest,BLOCKED,TBD,"CLAUDE.md: Requires evidence from Phase 1-4",PM/Architect,"Gate 3 prerequisite. Blocked by Phase 1." -PHASE-1-SHADOW-RUN,S0-S5,Cross,252+ Trading Day Shadow Run,BLOCKED,TBD,"docs/CURRENT/PHASE-1_SHADOW_RUN_STATUS_CORRECTION.md; docs/CURRENT/AEG-X-004_DBUP_EVIDENCE.md; docs/CURRENT/PHASE-1_REQUEUE_READINESS.md; docs/CURRENT/PHASE-1_EXECUTION_EVIDENCE_PLAN.md; docs/CURRENT/PHASE-1_PREFLIGHT_20260806.md; db/migrations/0032_shadow_run_queued_status_contract.sql; logs/phase-1-execution.log; logs/host-startup-20260804-173000.log",김재현/BE/SRE,"Owner 김재현; due 2026-08-06 KST. Read-only preflight: PostgreSQL reachable, Shadow API 5002 unavailable, approved server-side VersionSet absent. No enqueue or mutation performed. Repeat after activating approved host/VersionSet; then collect DBA receipt, new IDs, 202 response, and observation artifacts." +PHASE-1-SHADOW-RUN,S0-S5,Cross,252+ Trading Day Shadow Run,BLOCKED,TBD,"docs/CURRENT/PHASE-1_SHADOW_RUN_STATUS_CORRECTION.md; docs/CURRENT/AEG-X-004_DBUP_EVIDENCE.md; docs/CURRENT/PHASE-1_REQUEUE_READINESS.md; docs/CURRENT/PHASE-1_EXECUTION_EVIDENCE_PLAN.md; docs/CURRENT/PHASE-1_PREFLIGHT_20260806.md; docs/CURRENT/PHASE-1_PRODUCTION_PREFLIGHT_20260806.md; db/migrations/0032_shadow_run_queued_status_contract.sql; logs/phase-1-execution.log; logs/host-startup-20260804-173000.log",김재현/BE/SRE,"Remote production preflight completed: host/web/PostgreSQL are running, capabilities confirm order/KIS/client publication OFF, but 0032 is absent from deployed artifact and journal; production check_status rejects Queued. No direct SQL or enqueue performed. Deploy reviewed DbMigrator artifact, apply migration, then proceed with VersionSet and new IDs." diff --git a/docs/CURRENT/PHASE-1_PRODUCTION_PREFLIGHT_20260806.md b/docs/CURRENT/PHASE-1_PRODUCTION_PREFLIGHT_20260806.md new file mode 100644 index 00000000..cc6e5b51 --- /dev/null +++ b/docs/CURRENT/PHASE-1_PRODUCTION_PREFLIGHT_20260806.md @@ -0,0 +1,48 @@ +# Phase 1 Production Preflight Evidence — 2026-08-06 + +## Source / Assumption / Unknown / Decision Required + +- Source: SSH read-only inspection of `hz-prod-01`, `/app/kartsell/current`, remote Kestrel, and PostgreSQL through the configured application connection. +- Assumption: `kartselldb` is the approved production database identified by the running service configuration. +- Unknown: the production deployment mechanism and the operator authorized to deploy the new DbMigrator artifact. +- Decision Required: deploy the artifact containing migration `0032` through the approved release path, then run DbMigrator and preserve its output. + +## Confirmed remote facts + +```text +Host: hz-prod-01 +Service: kartsell.service = running +Application path: /app/kartsell/current +API: 127.0.0.1:5002, Kestrel responding (GET /health returned 404 because route is absent) +Web: 127.0.0.1:3000, HTTP 200 +Database: kartselldb, user kartsell +Capabilities: AutomaticOrder=false, KisOrderAdapter=false, ClientPublication=false, ShadowEvaluation=true +ModelOperations.Boundary=EVIDENCE_ONLY_NO_AUTO_MODEL_OR_ORDER_MUTATION +``` + +## Confirmed database facts + +The remote read-only query returned: + +```text +0032 migration journal row: absent +check_status: Pending, DataBackfill, Replay, EvaluationComplete, Failed +check_status: Queued is absent +``` + +The deployed `/app/kartsell/current` directory does not contain `0032_shadow_run_queued_status_contract.sql`. + +## Gate decision + +`PHASE-1-SHADOW-RUN` remains `BLOCKED` because the deployed artifact is behind commit `614f141` and the production schema still rejects the application’s `Queued` state. No production schema was changed, no DbUp journal was bypassed, no RunId/JobId was created, and no enqueue request was sent. + +## Corrective sequence + +1. Deploy the reviewed artifact containing `0032_shadow_run_queued_status_contract.sql` and the matching DbMigrator through the approved release path. +2. Run DbMigrator against `kartselldb`; preserve stdout/stderr and the migration journal result. +3. Re-run the read-only constraint query and verify `Queued` is present. +4. Freeze the approved server-side VersionSet and record it. +5. Generate new RunId, JobId, JobRunId, CorrelationId, and Idempotency-Key. +6. Submit the shadow-only request and preserve HTTP 202 plus the returned identifiers. + +Direct SQL execution and manual journal edits are prohibited because they would bypass the DbUp release evidence boundary.