Files
KArtSell.Aegis/tests/crash_recovery_validation.md
T
kjh2064 a55c9d617d
ci / backend (push) Failing after 0s
Build & Test with Secrets / build (push) Failing after 1s
ci / static (push) Failing after 8s
Build & Test with Secrets / security-scan (push) Failing after 5s
Build & Test with Secrets / frontend (push) Successful in 2m57s
Build & Test with Secrets / notification (push) Failing after 1s
ci / frontend (push) Successful in 3m5s
chore: Add Phase 2-3 validation templates for Gate 5 roadmap execution
Phase 2: PBO/DSR Metrics Validation
- Template for collecting Probability of Backtest Overfit metrics
- DSR (Daily Sharpe Ratio) validation checklist
- OOS (Out-of-Sample) performance by market phase
- Pass/fail criteria for each metric
- Evidence collection and archiving plan

Phase 3: Crash Recovery Rehearsal
- Four failure scenarios: outbox loss, DB drop, lock timeout, inbox failure
- Recovery procedures: state reconciliation, message replay, lock recovery
- Test result tracking matrix
- Verification checklist for each procedure
- Evidence documentation

Status (2026-08-03 22:30 KST):
 Phase 1 (Job 893): RUNNING (22:04 KST start)
 Phase 2 template: READY
 Phase 3 template: READY
 Phase 4 template: NEXT

These templates enable systematic Phase 2-3 execution when Phase 1 completes.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-03 22:12:20 +09:00

3.6 KiB

Gate 5: Crash Recovery Rehearsal Report

Status: IN PREPARATION
Phase: 3 (Parallel to Phase 2)
Timeline: TBD (5 days during Phase 2)
Template Version: 2026-08-03


🧪 Test Scenarios

Scenario 1: Outbox Message Loss

Setup:
  □ Start Job 893 processing
  □ Simulate message loss in Outbox
  
Execution:
  □ ShadowRunCompletedConsumer detects missing message
  □ Retry mechanism activates
  □ Message re-queued
  □ Processing resumes
  
Validation:
  □ No state corruption
  □ Message eventually processed
  □ Logs contain recovery trace
  
Result: [ ] PASS  [ ] FAIL
Notes: ___________

Scenario 2: PostgreSQL Connection Drop

Setup:
  □ Establish normal operation
  □ Simulate sudden connection drop
  
Execution:
  □ Connection pool detects failure
  □ Retry logic activates
  □ Connection re-established
  □ Processing resumes from checkpoint
  
Validation:
  □ No data loss
  □ No duplicate processing
  □ Transaction consistency maintained
  □ Connection restored within timeout
  
Result: [ ] PASS  [ ] FAIL
Notes: ___________

Scenario 3: Hangfire Distributed Lock Timeout

Setup:
  □ Multiple Hangfire workers active
  □ Simulate lock contention
  □ Trigger timeout condition
  
Execution:
  □ Lock acquisition times out
  □ Fallback mechanism activates (DEBT-015)
  □ Job continues without blocking
  □ Other workers unaffected
  
Validation:
  □ No deadlock observed
  □ Graceful degradation
  □ Logs contain timeout trace
  □ Recovery automatic
  
Result: [ ] PASS  [ ] FAIL
Notes: ___________

Scenario 4: Inbox Message Processing Failure

Setup:
  □ ApprovalQueueConsumer / AuditLogConsumer processing
  □ Simulate message deserialization failure
  
Execution:
  □ Error caught by consumer
  □ Message moved to DLQ (Dead Letter Queue)
  □ Alert/notification sent
  □ Processing continues
  
Validation:
  □ No data loss
  □ Failure logged with context
  □ Manual intervention possible
  □ Main pipeline unaffected
  
Result: [ ] PASS  [ ] FAIL
Notes: ___________

Recovery Procedures

Procedure 1: State Reconciliation

When state divergence detected:
  □ Identify divergence scope
  □ Verify data integrity
  □ Re-sync from source of truth
  □ Validate reconciliation
  □ Log reconciliation action
  
Verification: [ ] PASS  [ ] FAIL

Procedure 2: Message Replay

When messages need replay:
  □ Extract failed messages from logs
  □ Create replay batch
  □ Re-queue with idempotency check
  □ Monitor replay execution
  □ Verify all messages processed
  
Verification: [ ] PASS  [ ] FAIL

Procedure 3: Lock Recovery

When Hangfire lock stuck:
  □ Identify hung lock
  □ Check lock timeout (should auto-recover)
  □ Verify fallback activated (DEBT-015)
  □ Resume processing
  □ Monitor for re-occurrence
  
Verification: [ ] PASS  [ ] FAIL

📊 Test Results Summary

Scenario Status Duration Notes
Outbox Message Loss [ ] PASS [ ] FAIL TBD Pending
PostgreSQL Drop [ ] PASS [ ] FAIL TBD Pending
Hangfire Lock Timeout [ ] PASS [ ] FAIL TBD Pending
Inbox Failure [ ] PASS [ ] FAIL TBD Pending

Overall Result: Pending


Gate 5 Phase 3 Completion

  • All scenarios tested
  • All procedures verified
  • No unrecoverable failures
  • Recovery mechanisms work
  • Evidence archived
  • Status: PASS or FAIL (TBD)

Next: Phase 4 (Gate 5 Sign-Off)