Scaffold dd0c/cost: Welford baseline, anomaly scorer, governance engine, tests
- Welford online algorithm for running mean/stddev baselines - Anomaly scorer: z-score → 0-100 mapping, property-based tests (10K runs, fast-check) - Governance engine: 14-day auto-promotion with FP rate gate, injectable Clock - Panic mode: defaults to active (safe) when Redis unreachable - Tests: 12 scorer cases (incl 2x 10K property-based), 9 governance cases, 3 panic mode cases - PostgreSQL schema with RLS: baselines (optimistic locking), anomalies, remediation_actions - Fly.io config, Dockerfile
This commit is contained in:
39
products/05-aws-cost-anomaly/package.json
Normal file
39
products/05-aws-cost-anomaly/package.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "dd0c-cost",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "tsx watch src/index.ts",
|
||||
"build": "tsc",
|
||||
"start": "node dist/index.js",
|
||||
"test": "vitest run",
|
||||
"lint": "eslint src/ tests/"
|
||||
},
|
||||
"dependencies": {
|
||||
"fastify": "^4.28.0",
|
||||
"@fastify/cors": "^9.0.0",
|
||||
"pg": "^8.12.0",
|
||||
"ioredis": "^5.4.0",
|
||||
"zod": "^3.23.0",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"pino": "^9.1.0",
|
||||
"uuid": "^9.0.1",
|
||||
"@aws-sdk/client-cost-explorer": "^3.600.0",
|
||||
"@aws-sdk/client-cloudtrail": "^3.600.0",
|
||||
"@aws-sdk/client-dynamodb": "^3.600.0",
|
||||
"@aws-sdk/lib-dynamodb": "^3.600.0",
|
||||
"@slack/web-api": "^7.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.5.0",
|
||||
"tsx": "^4.15.0",
|
||||
"vitest": "^1.6.0",
|
||||
"fast-check": "^3.19.0",
|
||||
"@types/node": "^20.14.0",
|
||||
"@types/pg": "^8.11.0",
|
||||
"@types/jsonwebtoken": "^9.0.6",
|
||||
"@types/uuid": "^9.0.8",
|
||||
"eslint": "^9.5.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user