Problem: Program.cs:216 (RegisterModelOperationsSchedules) was the first
Hangfire Postgres touch at startup, with zero timeout protection. When
Hangfire.PostgreSql attempts PrepareSchemaIfNecessary and advisory lock
contention occurs, app hangs indefinitely with no logs after "Registered 12
endpoints", blocking Kestrel from binding.
Solution: Wrap all 6 RecurringJob registrations (lines 216, 226, 240, 260,
267, 273, 279) in consistent try/catch(Timeout) guards. Log WARN and continue
if lock times out, instead of silent infinite wait. Allows Kestrel to bind
even if Hangfire schema initialization is contentious.
Resolves DEBT-015 (Medium Impact / High Effort). Same pattern already existed
for outbox-poller/downstream-consumer; now applied consistently across all
scheduler jobs.
Tests: dotnet build KArtSell.sln -c Release passes with 0 errors/warnings.
Gate 3 execution will validate Kestrel startup now proceeds normally.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Move plaintext password item from Backlog to Deferred per AGENTS.md governance.
Not required for v16.0 validation gates. Revisit if security requirements change.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
**DB Isolation (P0):**
- Test connection string: kartselldb → kartselldb_test (prevents accidental production truncates)
- Production Host appsettings unchanged (kartselldb is correct for operations)
**Gate 3 Data Layer (P1):**
- Remove StubKrxDataService from ModelOperationsModule DI
- Register real KrxDataService as typed HttpClient in Program.cs
- KrxDataService already has built-in fallback to stub data when KRX_API_KEY is missing
- No behavior change for local dev (key missing → stub data); production ready (key present → real API)
**Tech Debt Registration (AGENTS.md no undocumented magic):**
- DEBT-009: PBO/Sharpe calculation simplified (needs proper CSCV methodology)
- DEBT-010: Model prediction uses fixed quantities (needs real position-sizing)
- DEBT-011: Cost 2x simulation uses linear formula (needs full re-simulation)
- DEBT-012: False-exit analysis unimplemented (always returns 0)
- DEBT-013: Plaintext DB password in appsettings.json (security debt)
- DEBT-014: Duplicate/reconciliation detection placeholders (infrastructure debt)
Gate 3 marked "rehearsal ready" (real KRX data, simplified analytics).
See TECH_DEBT_REGISTER.md for full impact/effort estimates.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Strengthen documentation coherence and navigation:
README.md:
- Add 'Developer's Document Guide' section at top
- Link to CLAUDE.md, AGENTS.md, architecture, guardrails, validation gates
- Reference docs/INDEX.md and TECH_DEBT_REGISTER.md
docs/INDEX.md (new):
- Central documentation index with purpose and audience
- Core guides, executive/planning, tech debt, reference docs
- Quick links for first change, architectural decisions, validation
TECH_DEBT_REGISTER.md (new):
- Tech debt tracking per AGENTS.md v16.0
- 8 registered debts (code analysis suppressions, deferred refactoring)
- Impact/Effort matrix with paydown strategy (quarterly 20% target)
- Status tracking with completion history
- How-to guide for resolving debt
CLAUDE.md:
- Update TECH_DEBT_REGISTER reference from 'to be created' to actual link
Result:
- Developers land on README → directed to CLAUDE.md or AGENTS.md
- All docs cross-reference each other for circular navigation
- Tech debt fully visible and tracked with clear paydown roadmap
- docs/INDEX.md provides comprehensive reference point
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>