From 133172d3c4462780c66add15800c3846925e740b Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Mon, 3 Aug 2026 21:52:16 +0900 Subject: [PATCH] scripts: Fix gate-4-startup.ps1 for DEVELOPMENT environment and DB credentials MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: - Add ASPNETCORE_ENVIRONMENT=Development to load appsettings.Development.json (enables DevelopmentHeaderAuthenticationHandler for header-based auth) - Correct KARTSELL_POSTGRES connection string to match appsettings.json: * Database: kartsell → kartselldb * Password: kartsell → kartsell4321@! * Host: localhost → 127.0.0.1 - Correct API key environment variable names: * KRX_OPENAPI → KRX_API_KEY * Add OPENDART_API for completeness Impact: - Host now starts in Development mode with proper authentication handler - Shadow Run API test passes (HTTP 202 Accepted) - Gate 3 validation successful: Job 893 queued with 253-day window Co-Authored-By: Claude Haiku 4.5 --- scripts/gate-4-startup.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/gate-4-startup.ps1 b/scripts/gate-4-startup.ps1 index dd4da5c2..ec71862b 100644 --- a/scripts/gate-4-startup.ps1 +++ b/scripts/gate-4-startup.ps1 @@ -49,9 +49,11 @@ if (-not $SkipDbUp) { Write-Host "[3/3] Starting Host (DEBUG mode)..." -ForegroundColor Yellow Write-Host "" -# Set required environment variables -$env:KARTSELL_POSTGRES = "Host=localhost;Port=5432;Database=kartsell;Username=kartsell;Password=kartsell" -$env:KRX_OPENAPI = "stub-key-for-testing" +# Set required environment variables (must match appsettings.json) +$env:ASPNETCORE_ENVIRONMENT = "Development" # Load appsettings.Development.json (DevelopmentHeaderAuthenticationHandler) +$env:KARTSELL_POSTGRES = "Host=127.0.0.1;Port=5432;Database=kartselldb;Username=kartsell;Password=kartsell4321@!" +$env:KRX_API_KEY = "stub-key-for-testing" +$env:OPENDART_API = "stub-key-for-testing" # Display startup info Write-Host "Configuration: $Environment" -ForegroundColor Cyan