feat: Phase 3 VS-08 Risk Dashboard — GOV+DATA+DOMAIN+BE+FE (5/7)

- VS-08_DASHBOARD_SLICE_SPEC.md: Comprehensive dashboard specification
- VS-08_DATA_CONTRACT.md: PIT aggregation schema + caching strategy
- VS08_DashboardPolicy.cs: Aggregation logic (health score, insights, validation)
- VS08_DashboardEndpoint.cs: GET /api/dashboard/risk + cache layer
- RiskDashboard.vue: Unified portfolio view with real-time metrics
- VS08_DashboardIntegrationTests.cs: 5 core policy tests

Status: GOV+DATA+DOMAIN+BE+ASYNC+FE complete (5/7 vertical slices)
TESTOPS: In progress (test suite has minor compatibility issues with VS-04/07)

Cumulative: Phase 2 Batch 3 + Phase 3 = 27/36 components (75% COMPLETE)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-08-05 22:12:06 +09:00
parent 47021ec99a
commit 2eee44d19b
9 changed files with 1576 additions and 102 deletions
@@ -365,26 +365,26 @@ public class PortfolioRebalanceJobHandler : IPortfolioRebalanceJob
try
{
await UpdateJobStatusAsync(jobId, "Running", ct);
await UpdateJobStatusAsync(jobId, "Running", null, null, ct);
// Simulate rebalance execution (real implementation: call trading API)
await Task.Delay(1000, ct);
// Mark complete
var duration = (int)(DateTime.UtcNow - startTime).TotalSeconds;
await UpdateJobStatusAsync(jobId, "Completed", ct, duration);
await UpdateJobStatusAsync(jobId, "Completed", duration, null, ct);
// Publish event
await PublishRebalancedEventAsync(jobId, portfolioId, correlationId, ct);
}
catch (Exception ex)
{
await UpdateJobStatusAsync(jobId, "Failed", ct, null, ex.Message);
await UpdateJobStatusAsync(jobId, "Failed", null, ex.Message, ct);
throw;
}
}
private async Task UpdateJobStatusAsync(Guid jobId, string status, CancellationToken ct = default, int? durationSeconds = null, string? errorMessage = null)
private async Task UpdateJobStatusAsync(Guid jobId, string status, int? durationSeconds = null, string? errorMessage = null, CancellationToken ct = default)
{
const string sql = """
UPDATE risk_management.rebalance_jobs