feat: model validation, calibration, and signal quality layer
ci/woodpecker/push/test Pipeline failed
ci/woodpecker/push/build-1 unknown status
ci/woodpecker/push/build-3 unknown status
ci/woodpecker/push/build-2 unknown status
ci/woodpecker/push/finalize unknown status
Build and Push / lint-and-test (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.adapters.broker_adapter name:broker-adapter]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.aggregation.worker name:aggregation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.extractor.worker name:extractor]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.ingestion.worker name:ingestion]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.lake_publisher.worker name:lake-publisher]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.parser.worker name:parser]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.recommendation.worker name:recommendation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.scheduler.app name:scheduler]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.api.app:app --host 0.0.0.0 --port 8000 name:query-api]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.risk.app:app --host 0.0.0.0 --port 8000 name:risk]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.symbol_registry.app:app --host 0.0.0.0 --port 8000 name:symbol-registry]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.trading.app:app --host 0.0.0.0 --port 8000 name:trading-engine]) (push) Has been cancelled
Build and Push / build-dashboard (push) Has been cancelled
Build and Push / build-superset (push) Has been cancelled
Build and Push / integration-test (push) Has been cancelled
Build and Push / beta-gate (push) Has been cancelled
ci/woodpecker/push/test Pipeline failed
ci/woodpecker/push/build-1 unknown status
ci/woodpecker/push/build-3 unknown status
ci/woodpecker/push/build-2 unknown status
ci/woodpecker/push/finalize unknown status
Build and Push / lint-and-test (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.adapters.broker_adapter name:broker-adapter]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.aggregation.worker name:aggregation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.extractor.worker name:extractor]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.ingestion.worker name:ingestion]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.lake_publisher.worker name:lake-publisher]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.parser.worker name:parser]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.recommendation.worker name:recommendation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.scheduler.app name:scheduler]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.api.app:app --host 0.0.0.0 --port 8000 name:query-api]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.risk.app:app --host 0.0.0.0 --port 8000 name:risk]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.symbol_registry.app:app --host 0.0.0.0 --port 8000 name:symbol-registry]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.trading.app:app --host 0.0.0.0 --port 8000 name:trading-engine]) (push) Has been cancelled
Build and Push / build-dashboard (push) Has been cancelled
Build and Push / build-superset (push) Has been cancelled
Build and Push / integration-test (push) Has been cancelled
Build and Push / beta-gate (push) Has been cancelled
- Migration 035: prediction_snapshots, prediction_outcomes, signal_evidence_links, model_metric_snapshots tables + SQL views - Prediction snapshot writer with canonical evidence keys, duplicate detection, contribution scores - Outcome evaluator across 5 horizons (1h, 6h, 1d, 7d, 30d) - Metrics engine: ECE, Brier score, IC, Rank IC, benchmark comparison - Attribution engine: per-source, per-catalyst, per-layer performance - Calibration engine: Bayesian shrinkage source reliability - Quality gate for live trading eligibility with configurable thresholds - 7 new /api/validation/* endpoints - Upgraded OpsModel dashboard with validation tab - Enhanced recommendation display with calibration context - Backtest replay validation mode - 86 Python tests (unit + property-based), 179 frontend tests passing
This commit is contained in:
@@ -169,6 +169,55 @@ describe('Global Events page', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('OpsModel validation tab', () => {
|
||||
it('renders Model Validation tab with summary cards', async () => {
|
||||
renderRoute('/ops/model');
|
||||
await waitFor(() => expect(screen.getByText('Model Performance')).toBeInTheDocument());
|
||||
|
||||
// The tab buttons should be present
|
||||
expect(screen.getByText('Extraction Performance')).toBeInTheDocument();
|
||||
expect(screen.getByText('Model Validation')).toBeInTheDocument();
|
||||
|
||||
// Click the Model Validation tab button
|
||||
await userEvent.click(screen.getByText('Model Validation'));
|
||||
|
||||
// Summary cards should render key metric labels unique to the validation summary
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('Brier Score')).toBeInTheDocument();
|
||||
expect(screen.getByText('ECE')).toBeInTheDocument();
|
||||
expect(screen.getByText('Directional Accuracy')).toBeInTheDocument();
|
||||
expect(screen.getByText('Excess vs SPY')).toBeInTheDocument();
|
||||
});
|
||||
}, 10000);
|
||||
|
||||
it('renders calibration table with miscalibration warning', async () => {
|
||||
renderRoute('/ops/model');
|
||||
await waitFor(() => expect(screen.getByText('Model Performance')).toBeInTheDocument());
|
||||
|
||||
await userEvent.click(screen.getByText('Model Validation'));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('Calibration by Confidence Bucket')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
// Miscalibrated buckets should show warning text
|
||||
const miscalWarnings = screen.getAllByText('Miscalibrated');
|
||||
expect(miscalWarnings.length).toBeGreaterThanOrEqual(1);
|
||||
}, 10000);
|
||||
|
||||
it('renders gate status pass/fail indicator', async () => {
|
||||
renderRoute('/ops/model');
|
||||
await waitFor(() => expect(screen.getByText('Model Performance')).toBeInTheDocument());
|
||||
|
||||
await userEvent.click(screen.getByText('Model Validation'));
|
||||
|
||||
// The gate-status endpoint returns passed: false
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText(/Live Trading Gate: FAIL/)).toBeInTheDocument();
|
||||
});
|
||||
}, 10000);
|
||||
});
|
||||
|
||||
describe('Agents page', () => {
|
||||
it('renders agent list in sidebar', async () => {
|
||||
renderRoute('/agents');
|
||||
|
||||
Reference in New Issue
Block a user