feat(skills): add rollout promotion contract and sync planning state

This commit is contained in:
William Valentin
2026-02-13 08:51:19 -08:00
parent 46099664f0
commit 8f644d5e25
8 changed files with 464 additions and 56 deletions
+33 -33
View File
@@ -9,28 +9,28 @@ Requirements for this milestone. Each maps to roadmap phases.
### Daemon Decomposition
- [ ] **DECO-01**: Model client creation logic extracted from daemon/index.ts into src/daemon/models.ts with the same public interface
- [ ] **DECO-02**: Channel adapter setup logic extracted into src/daemon/channels.ts
- [ ] **DECO-03**: Agent cache and factory logic extracted into src/daemon/agents.ts
- [ ] **DECO-04**: Memory store and vector store initialization extracted into src/daemon/memory.ts
- [ ] **DECO-05**: Tool registration and policy wiring extracted into src/daemon/tools.ts
- [ ] **DECO-06**: Message routing logic extracted into src/daemon/routing.ts (test file already exists)
- [ ] **DECO-07**: daemon/index.ts reduced to a thin composition root that imports and wires extracted modules
- [ ] **DECO-08**: All 1077+ existing tests continue to pass after decomposition
- [x] **DECO-01**: Model client creation logic extracted from daemon/index.ts into src/daemon/models.ts with the same public interface
- [x] **DECO-02**: Channel adapter setup logic extracted into src/daemon/channels.ts
- [x] **DECO-03**: Agent cache and factory logic extracted into src/daemon/agents.ts
- [x] **DECO-04**: Memory store and vector store initialization extracted into src/daemon/memory.ts
- [x] **DECO-05**: Tool registration and policy wiring extracted into src/daemon/tools.ts
- [x] **DECO-06**: Message routing logic extracted into src/daemon/routing.ts (test file already exists)
- [x] **DECO-07**: daemon/index.ts reduced to a thin composition root that imports and wires extracted modules
- [x] **DECO-08**: All 1077+ existing tests continue to pass after decomposition
### Config Overlays
- [ ] **CONF-01**: User can set FLYNN_ENV environment variable to select a config overlay (e.g., docker, production)
- [ ] **CONF-02**: Config loader merges environment-specific overlay file on top of base config with deep merge
- [ ] **CONF-03**: flynn doctor validates that the selected environment overlay file exists when FLYNN_ENV is set
- [x] **CONF-01**: User can set FLYNN_ENV environment variable to select a config overlay (e.g., docker, production)
- [x] **CONF-02**: Config loader merges environment-specific overlay file on top of base config with deep merge
- [x] **CONF-03**: flynn doctor validates that the selected environment overlay file exists when FLYNN_ENV is set
### Live Ops Dashboard
- [ ] **DASH-01**: Dashboard shows core counters: messages processed, active sessions, queue depth, daemon uptime
- [ ] **DASH-02**: Dashboard shows model call metrics: per-call latency, tokens/sec throughput, error rates by provider
- [ ] **DASH-03**: Dashboard shows live event stream: scrollable log of errors and events with timestamps and context
- [ ] **DASH-04**: Dashboard shows active request tracking: in-flight requests, recent tool executions, active agent sessions
- [ ] **DASH-05**: Gateway exposes /health endpoint returning JSON status for liveness/readiness checks
- [x] **DASH-01**: Dashboard shows core counters: messages processed, active sessions, queue depth, daemon uptime
- [x] **DASH-02**: Dashboard shows model call metrics: per-call latency, tokens/sec throughput, error rates by provider
- [x] **DASH-03**: Dashboard shows live event stream: scrollable log of errors and events with timestamps and context
- [x] **DASH-04**: Dashboard shows active request tracking: in-flight requests, recent tool executions, active agent sessions
- [x] **DASH-05**: Gateway exposes /health endpoint returning JSON status for liveness/readiness checks
## v2 Requirements
@@ -71,22 +71,22 @@ Which phases cover which requirements. Updated during roadmap creation.
| Requirement | Phase | Status |
|-------------|-------|--------|
| DECO-01 | Phase 1 | Pending |
| DECO-02 | Phase 1 | Pending |
| DECO-03 | Phase 1 | Pending |
| DECO-04 | Phase 1 | Pending |
| DECO-05 | Phase 1 | Pending |
| DECO-06 | Phase 1 | Pending |
| DECO-07 | Phase 1 | Pending |
| DECO-08 | Phase 1 | Pending |
| CONF-01 | Phase 2 | Pending |
| CONF-02 | Phase 2 | Pending |
| CONF-03 | Phase 2 | Pending |
| DASH-01 | Phase 3 | Pending |
| DASH-02 | Phase 3 | Pending |
| DASH-03 | Phase 3 | Pending |
| DASH-04 | Phase 3 | Pending |
| DASH-05 | Phase 3 | Pending |
| DECO-01 | Phase 1 | Complete |
| DECO-02 | Phase 1 | Complete |
| DECO-03 | Phase 1 | Complete |
| DECO-04 | Phase 1 | Complete |
| DECO-05 | Phase 1 | Complete |
| DECO-06 | Phase 1 | Complete |
| DECO-07 | Phase 1 | Complete |
| DECO-08 | Phase 1 | Complete |
| CONF-01 | Phase 2 | Complete |
| CONF-02 | Phase 2 | Complete |
| CONF-03 | Phase 2 | Complete |
| DASH-01 | Phase 3 | Complete |
| DASH-02 | Phase 3 | Complete |
| DASH-03 | Phase 3 | Complete |
| DASH-04 | Phase 3 | Complete |
| DASH-05 | Phase 3 | Complete |
**Coverage:**
- v1 requirements: 16 total
@@ -95,4 +95,4 @@ Which phases cover which requirements. Updated during roadmap creation.
---
*Requirements defined: 2026-02-09*
*Last updated: 2026-02-09 after initial definition*
*Last updated: 2026-02-13 after Phase 3 completion*
+4 -4
View File
@@ -67,8 +67,8 @@ Plans:
**Plans:** 2 plans in 2 waves
Plans:
- [ ] 03-01-PLAN.md — Backend metrics collector, RPC handlers, HTTP /health endpoint
- [ ] 03-02-PLAN.md — Dashboard UI with live counters, model metrics, event stream, active requests
- [x] 03-01-PLAN.md — Backend metrics collector, RPC handlers, HTTP /health endpoint
- [x] 03-02-PLAN.md — Dashboard UI with live counters, model metrics, event stream, active requests
| Plan | Wave | Objective | Tasks |
|------|------|-----------|-------|
@@ -87,10 +87,10 @@ Plans:
|-------|--------|--------------|
| 1 — Daemon Decomposition | **complete** | DECO-01..08 (8) — 3 plans, 2 waves |
| 2 — Config Overlays | **complete** | CONF-01..03 (3) — 2 plans, 2 waves |
| 3 — Live Ops Dashboard | not_started | DASH-01..05 (5) |
| 3 — Live Ops Dashboard | **complete** | DASH-01..05 (5) — 2 plans, 2 waves |
**Coverage:** 16/16 v1 requirements mapped ✓
---
*Roadmap created: 2026-02-09*
*Last updated: 2026-02-10*
*Last updated: 2026-02-13*
+11 -9
View File
@@ -9,9 +9,9 @@
## Current Position
**Phase:** 3 — Live Ops Dashboard
**Plan:** 1 of 2 complete (03-01 done)
**Status:** in_progress
**Progress:** ██████████ 2.5/3 phases (Phase 3: 1/2 plans)
**Plan:** 2 of 2 complete (03-01 and 03-02 done)
**Status:** complete
**Progress:** ██████████ 3/3 phases (Phase 3: 2/2 plans)
## Phase Status
@@ -19,13 +19,13 @@
|-------|--------|-------|
| 1 — Daemon Decomposition | **complete** | 3/3 plans complete |
| 2 — Config Overlays | **complete** | 2/2 plans complete |
| 3 — Live Ops Dashboard | **in_progress** | 1/2 plans complete |
| 3 — Live Ops Dashboard | **complete** | 2/2 plans complete |
## Performance Metrics
| Metric | Value |
|--------|-------|
| Test count | 1107 (verified after 03-01, +20 metrics tests from 1087 baseline) |
| Test count | 1597 (verified after runtime-cancellation follow-up) |
| daemon/index.ts lines | 140 (from 1087 baseline, -87%) |
| Total daemon modules | 9 files, 1271 lines |
| Plan 01-01 duration | 9 min |
@@ -40,6 +40,8 @@
| Plan 02-02 tasks | 1/1 |
| Plan 03-01 duration | ~2 min |
| Plan 03-01 tasks | 2/2 |
| Plan 03-02 status | implemented and verified with typecheck/build/test; summary backfilled |
| Plan 03-02 tasks | 2/2 |
## Accumulated Context
@@ -91,10 +93,10 @@ _(none)_
## Session Continuity
**Last session:** Plan 03-01 (metrics collection backend) completed
**Stopped at:** Completed 03-01-PLAN.md — Phase 3 plan 1 of 2 done
**Next action:** Execute 03-02-PLAN.md (Dashboard UI)
**Last session:** Phase 3 closure and dashboard verification run
**Stopped at:** Completed 03-02 plan summary and roadmap/requirements status sync
**Next action:** Start next milestone or pick a new planning phase
---
*State initialized: 2026-02-09*
*Last updated: 2026-02-10T05:29Z*
*Last updated: 2026-02-13T08:20Z*
@@ -0,0 +1,96 @@
---
phase: 03-live-ops-dashboard
plan: 02
subsystem: gateway-ui
tags: [dashboard, ui, metrics, events, active-requests, monitoring]
# Dependency graph
requires:
- phase: 03-live-ops-dashboard
provides: "MetricsCollector, system.metrics/system.events/system.activeRequests RPC handlers, and /health endpoint"
provides:
- "Live Ops dashboard UI sections for counters, model performance, event stream, active requests, and channels"
- "Dual refresh cadence: fast (3s) metrics/events/requests and slow (10s) health/channels"
- "Event stream styling and model metrics summary styling"
affects: [operator-observability, milestone-closure]
# Tech tracking
tech-stack:
added: []
patterns:
- "Targeted section updates via stable DOM IDs"
- "Split polling cadence for high-churn vs low-churn data"
key-files:
created: []
modified:
- src/gateway/ui/pages/dashboard.js
- src/gateway/ui/style.css
key-decisions:
- "Keep vanilla JS page module pattern (render/teardown), no framework migration"
- "Use two polling timers (3s and 10s) to reduce unnecessary RPC load"
- "Render newest events at the bottom with auto-scroll for log readability"
patterns-established:
- "Dashboard section IDs as update boundaries: ops-counters, ops-model-table, ops-events, ops-requests, ops-channels"
# Metrics
duration: unknown (implementation commit predates this summary backfill)
completed: 2026-02-13
---
# Phase 3 Plan 2: Live Ops Dashboard UI Summary
**Extended the existing dashboard with live counters, model performance telemetry, event stream, and active request visibility, backed by Phase 3 Plan 1 RPC endpoints.**
## Performance
- **Summary date:** 2026-02-13
- **Tasks:** 2/2 (implementation + closure/verification)
- **Files modified:** 2
## Accomplishments
- Implemented dashboard sections for core counters, model metrics table, event stream, active requests, and channels
- Wired RPC calls to `system.metrics`, `system.events`, `system.activeRequests`, `system.health`, and `system.channels`
- Added 3-second fast refresh for dynamic ops data and 10-second slow refresh for health/channel state
- Added event stream and model summary styling in shared gateway UI stylesheet
## Task Commits
Implementation was already present in commit history and is now formally closed with planning artifacts:
1. **Task 1: Extend dashboard page with live ops sections** - `c3ca3f3` (feat)
2. **Follow-up style cleanup** - `6090508` (style)
## Files Created/Modified
- `src/gateway/ui/pages/dashboard.js` - Live ops dashboard structure, polling, and targeted section updates
- `src/gateway/ui/style.css` - Event stream and model metrics summary styles
## Verification
Automated checks run during this closure:
- `pnpm typecheck`
- `pnpm build`
- `pnpm test:run` ✅ (1590/1590 passed)
Manual browser verification (visual sanity check) remains recommended as a final operator check.
## Deviations from Plan
No functional deviations. This summary was backfilled after implementation had already landed.
## Issues Encountered
None
## User Setup Required
None
## Next Phase Readiness
- Phase 3 is complete from an implementation and automated validation perspective
- Milestone artifacts are now synchronized (`STATE.md`, `ROADMAP.md`, `REQUIREMENTS.md`)
---
*Phase: 03-live-ops-dashboard*
*Completed: 2026-02-13*