How mukesh-2710/canary2 works
CanaryGate ingests request telemetry, filters and segments it into endpoint/client cohorts, then evaluates new endpoints against absolute limits and established endpoints against stable traffic. The cohort verdicts drive a sticky traffic ramp and an audit trail. Operators use the React console to load scenarios, submit evaluations, inspect cohort and naive-global comparisons, and tune thresholds. The main orchestration and decision paths are visible in the sampled backend references; some UI-to-API and unsampled subsystem links are documented or left unverified.
Main entry points: main.py API routes · App.jsx Console state and actions · decision.py Cohort referee · api.js API client
Components 24
Telemetry intake
- API routes
backend/app/main.py - Event models
backend/app/models.py - OTLP normalization
backend/app/telemetry.py - Rolling event store
backend/app/store.py - Scenario generator
backend/app/scenarios.py
Evaluation engine
- Cohort segmentation
backend/app/cohort.py - Event filters
backend/app/filters.py - Cohort referee
backend/app/decision.py - Statistical tests
backend/app/stats.py - Metric plugins
backend/app/metrics.py - Decision thresholds
backend/app/config.py
Rollout control
- Verdict aggregator
backend/app/aggregator.py - Evaluation audit
backend/app/audit.py
Operator console
- Console state and actions
frontend/src/App.jsx - API client
frontend/src/api.js - Scenario controls
frontend/src/components/ScenarioLoader.jsx - Ingestion panel
frontend/src/components/IngestionPanel.jsx - Cohort results
frontend/src/components/CohortList.jsx - Naive comparison
frontend/src/components/NaiveVsStratified.jsx - Verdict display
frontend/src/components/VerdictBanner.jsx - Threshold controls
frontend/src/components/StrictnessPanel.jsx - Audit timeline
frontend/src/components/AuditTimeline.jsx
Other components
- Operator
- Telemetry source
Connections 28
- Telemetry source → API routes: sends telemetry
README.md - API routes → Event models: validates events
backend/app/main.py - API routes → OTLP normalization: normalizes traces
backend/app/main.py - API routes → Rolling event store: stores events
backend/app/main.py - API routes → Scenario generator: loads scenarios
backend/app/main.py - API routes → Rolling event store: reads evaluation window
README.md - API routes → Cohort segmentation: segments events
backend/app/main.py - API routes → Cohort referee: evaluates cohorts
backend/app/main.py - Cohort referee → Event filters: preprocesses events
backend/app/decision.py - Cohort referee → Statistical tests: tests degradation
backend/app/decision.py - Cohort referee → Metric plugins: evaluates metrics
backend/app/decision.py - Cohort referee → Decision thresholds: reads thresholds
backend/app/decision.py - API routes → Verdict aggregator: aggregates verdicts
backend/app/main.py - API routes → Evaluation audit: records evaluations
backend/app/main.py - Verdict aggregator → Decision thresholds: uses ramp ladder
backend/app/aggregator.py - Operator → Console state and actions: operates
README.md - Console state and actions → API client: requests actions
frontend/src/App.jsx - Console state and actions → Scenario controls: renders
frontend/src/App.jsx - Console state and actions → Ingestion panel: renders
frontend/src/App.jsx - Console state and actions → Cohort results: renders
frontend/src/App.jsx - Console state and actions → Naive comparison: renders
frontend/src/App.jsx - Console state and actions → Verdict display: renders
frontend/src/App.jsx - Console state and actions → Threshold controls: renders
frontend/src/App.jsx - Console state and actions → Audit timeline: renders
frontend/src/App.jsx - API client → API routes: calls HTTP endpoints
- API routes → Verdict aggregator: updates traffic ramp
README.md - Audit timeline → API client: requests audit history
frontend/src/components/AuditTimeline.jsx - Threshold controls → API client: reads and patches config
frontend/src/components/StrictnessPanel.jsx