Commit Graph

73 Commits

Author SHA1 Message Date
31cb36fb77 Scaffold dd0c/drift Go agent: CLI, scanner, scrubber, reporter, models
- cobra CLI: check (one-shot), watch (SQS consumer), version
- models: DriftReport, DriftedResource, severity classification (critical/high/medium/low)
- scanner: Terraform v4 state parser, resource counter
- scrubber: regex + Shannon entropy secret detection (strict/permissive/off modes)
- reporter: mTLS HTTP client with nonce replay prevention
- tests: severity classification (8 cases), scrubber (AWS keys, RSA, entropy, attributes)
2026-03-01 02:42:53 +00:00
e626608535 Add proxy latency benchmark (criterion, 1000 samples, 1/5/10 msg variants) 2026-03-01 02:40:45 +00:00
e882f181d5 Add dd0c/route integration tests: proxy engine with wiremock
- Forward request to upstream and verify response passthrough
- Telemetry event emission (org_id, model, latency, status)
- Low-complexity routing: gpt-4o → gpt-4o-mini with strategy=cheapest
- Upstream error passthrough (429 rate limit)
- Invalid JSON → 400 Bad Request
- Health endpoint returns 200
2026-03-01 02:40:09 +00:00
c5ef45e69b Add dd0c/route unit tests: router, middleware, config, digest
- Router tests: complexity classification (low/medium/high), routing decisions, cost delta
- Middleware tests: API key redaction (OpenAI, Anthropic, Bearer), JSON bodies, telemetry safety
- Config tests: defaults, unknown provider fallbacks
- Digest tests: next_monday_9am scheduling edge cases
- Anomaly tests: threshold logic, divide-by-zero guard
2026-03-01 02:39:01 +00:00
8a4c7c256d Add V1 infrastructure: Gitea Actions CI/CD + Fly.io + Cloudflare Pages
- Gitea Actions workflows: ci.yml (tests+clippy+fmt), benchmark.yml (P99 gate), deploy.yml (Fly+CF)
- Fly.io configs: proxy (shared-cpu, 256MB, min 1 machine), API (scale-to-zero)
- Dockerfiles: multi-stage Rust builds for proxy and API binaries
- INFRASTRUCTURE.md: full V1 stack (~$5/mo), AWS migration path, Gitea runner setup, DNS plan
- Stack: Fly.io + Cloudflare Pages + Neon + Upstash + Gitea Actions
2026-03-01 02:37:48 +00:00
a486373d93 Add dd0c/route Dashboard UI: React + Vite + Tailwind SPA
- Layout with sidebar navigation (Dashboard, Rules, Keys, Settings)
- Dashboard page: stat cards, cost savings area chart (Recharts), model usage table
- Rules page: routing rules CRUD with modal editor, strategy/complexity/model matching
- Keys page: API key generation, copy-once reveal, revocation, quick-start code snippet
- Settings page: org info, provider config, danger zone
- API client (SWR + fetch wrapper) with full TypeScript types
- dd0c dark theme: indigo primary, cyan accent, dark surfaces
- Vite proxy config for local dev against API on :3000
2026-03-01 02:36:32 +00:00
0fe25b8aa6 Add dd0c/route worker: weekly digest generation + hourly anomaly detection
- digest.rs: Weekly cost savings digest per org, top models, top routing savings
- anomaly.rs: Threshold-based anomaly detection (3x hourly average = alert)
- main.rs: Periodic task scheduler (hourly anomaly, weekly digest, daily cost refresh)
- next_monday_9am() with unit tests for scheduling
2026-03-01 02:32:28 +00:00
e234f66b9b Add dd0c/route Dashboard API: analytics, routing rules CRUD, API keys, providers
- GET /api/v1/analytics/summary — 7-day cost savings, latency, routing breakdown
- GET /api/v1/analytics/timeseries — hourly/daily rollups from TimescaleDB continuous aggregates
- GET /api/v1/analytics/models — per-model cost and token breakdown
- CRUD /api/v1/rules — routing rules with priority, match conditions, strategies
- CRUD /api/v1/keys — API key generation (dd0c_ prefix), bcrypt hashing, revocation
- CRUD /api/v1/providers — provider config upsert with encrypted key storage
- GET /api/v1/org — org info
- Role-based access: Owner required for mutations
2026-03-01 02:31:28 +00:00
311a834228 Add dd0c/route project scaffolding: migrations, docker-compose, README
- PostgreSQL schema: orgs, users, api_keys, provider_configs, routing_rules, cost_tables, feature_flags
- TimescaleDB schema: request_events hypertable, hourly/daily continuous aggregates, compression, retention
- docker-compose.yml: postgres, timescaledb, redis for local dev
- README with quick start, architecture overview, pricing tiers
- .env.example, .gitignore
2026-03-01 02:29:23 +00:00
72a0f26a7b Add BMad review epic addendums for all 6 products
Per-product surgical additions to existing epics (not cross-cutting):
- P1 route: 8pts (key redaction, SSE billing, token math, CI runner)
- P2 drift: 12pts (mTLS revocation, state lock recovery, pgmq visibility, RLS leak, entropy scrubber)
- P3 alert: 10pts (HMAC replay, claim-check, out-of-order correlation, free tier, tenant isolation)
- P4 portal: 9pts (partial scan recovery, ownership conflicts, Meilisearch rebuild, VCR freshness, free tier)
- P5 cost: 7pts (concurrent baselines, remediation RBAC, Clock interface, property tests, Redis fallback)
- P6 run: 15pts (shell AST parsing, canary suite, intervention TTL, streaming audit, crypto signatures)

Total: 61 story points across 30 new stories
2026-03-01 02:27:55 +00:00
cc003cbb1c Scaffold dd0c/route core proxy engine (handler, router, auth, config) 2026-03-01 02:23:27 +00:00
d038cd9c5c Implement BMad Must-Have Before Launch fixes for all 6 products
P1: API key redaction, SSE billing leak, token math edge cases, CI runner config
P2: mTLS revocation lockout, terraform state lock recovery, RLS pool leak, entropy scrubber, pgmq visibility
P3: HMAC replay prevention, cross-tenant negative tests, correlation window edge cases, SQS claim-check, free tier
P4: Discovery partial failure recovery, ownership conflict integration test, VCR freshness CI, Meilisearch rebuild, Cmd+K latency
P5: Concurrent baseline conflicts, remediation RBAC, Clock interface for governance, 10K property-based runs, Redis panic fallback
P6: Cryptographic agent update signatures, streaming audit logs with WAL, shell AST parsing (mvdan/sh), intervention deadlock TTL, canary suite CI gate
2026-03-01 02:14:04 +00:00
b24cfa7c0d BMad code reviews complete for all 6 products
P1 route: Gemini — 'Ship the proxy, stop writing tests for the tests'
P2 drift: Gemini — mTLS revocation, state lock corruption, RLS pool leak
P3 alert: Gemini — replay attacks, trace propagation, SQS claim-check
P4 portal: Manual — discovery reliability is existential risk
P5 cost: Manual — concurrent baselines, remediation RBAC, pricing staleness
P6 run: Gemini — policy update loophole, AST parsing, audit streaming
2026-03-01 02:09:19 +00:00
9cc5aeaa03 BMad code reviews for P4 (portal) and P5 (cost) — manual
P4: Discovery reliability flagged as existential risk, VCR cassette staleness,
    ownership conflict race condition, Step Functions→cron gap
P5: Concurrent baseline update risk, remediation RBAC gap, pricing staleness,
    property-based tests need 10K runs, Clock interface needed for governance
2026-03-01 02:06:06 +00:00
b7cce013ed Phase 3: BDD acceptance specs for P4 (portal) — partial
P4: 1,177 lines (subagent still running, may have more output pending)
All 6 products now have acceptance specs committed.
2026-03-01 02:01:04 +00:00
c3bafa238a Add dual-mode deployment addendums for all 6 products
P1 route: 16 pts (template, full docker-compose + install script)
P2 drift: 17 pts (pgmq, local CA for mTLS)
P3 alert: 19 pts (Lambda→Fastify, DynamoDB→PG JSONB)
P4 portal: 18 pts (Step Functions→cron, Aurora→PG+pgvector)
P5 cost: 19 pts (EventBridge→agent/polling, DynamoDB→PG JSONB)
P6 run: 15 pts (easiest — already PG-native, no AWS deps in core)

Total self-hosted effort: ~104 story points across all 6 products
2026-03-01 02:00:00 +00:00
96e51054ae Add dual-mode deployment architecture addendum for P1 (route)
Docker Compose self-hosted mode, install script, auth abstraction,
data layer abstraction (SQS→pgmq, Cognito→local JWT, S3→local FS),
Caddy auto-TLS, upgrade path, self-hosted BDD specs.
16 story points additional effort. Template for all 6 products.
2026-03-01 01:58:15 +00:00
4938674c20 Phase 3: BDD acceptance specs for P2 (drift), P3 (alert), P6 (run)
P2: 2,245 lines, 10 epics — Sonnet subagent (8min)
P3: 1,653 lines, 10 epics — Sonnet subagent (6min)
P6: 2,303 lines, 262 scenarios, 10 epics — Sonnet subagent (7min)
P4 (portal) still in progress
2026-03-01 01:54:35 +00:00
c1484426cc Phase 3: BDD acceptance specs for P1 (route) and P5 (cost)
P1: 50+ scenarios across 10 epics, all stories covered
P5: 55+ scenarios across 10 epics, written manually (Sonnet credential failures)
Remaining P2/P3/P4/P6 in progress via subagents
2026-03-01 01:50:30 +00:00
03bfe931fc Implement review remediation + PLG analytics SDK
- All 6 test architectures patched with Section 11 addendums
- P5 (cost) fully rewritten from 232 to ~600 lines
- PLG brainstorm + party mode advisory board results
- Analytics SDK v2 (PostHog Cloud, Zod strict, Lambda-safe)
- Analytics tests v2 (safeParse, no , no timestamp, no PII)
- Addresses all Gemini review findings across P1-P6
2026-03-01 01:42:49 +00:00
2fe0ed856e Add Gemini TDD reviews for all 6 products
P1, P2, P3, P4, P6 reviewed by Gemini subagents.
P5 reviewed manually (Gemini credential errors).
All reviews flag coverage gaps, anti-patterns, and Transparent Factory tenet gaps.
2026-03-01 00:29:24 +00:00
1101fef096 Update test architectures for P3, P4, P5 2026-02-28 23:33:07 +00:00
5ee95d8b13 dd0c: full product research pipeline - 6 products, 8 phases each
Products: route, drift, alert, portal, cost, run
Phases: brainstorm, design-thinking, innovation-strategy, party-mode,
        product-brief, architecture, epics (incl. Epic 10 TF compliance),
        test-architecture (TDD strategy)

Brand strategy and market research included.
2026-02-28 17:35:02 +00:00