fix(review): apply autofix feedback
- add missing changesets for the Command Center dashboard and Monitor stage (both ship in published @runfusion/fusion; required by AGENTS.md) - pin the knowledge_pages migration test to literal version 118 (not SCHEMA_VERSION-1) so it keeps exercising migration 119 after later bumps
This commit is contained in:
10
.changeset/command-center-dashboard.md
Normal file
10
.changeset/command-center-dashboard.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
"@runfusion/fusion": minor
|
||||
---
|
||||
|
||||
Add the **Command Center** dashboard — a combined analytics/observability and live Mission-Control view (`?view=command-center`).
|
||||
|
||||
- **Telemetry** — a queryable `usage_events` SQLite table populated via a dedicated `emitUsageEvent` capture seam (tool calls, messages, session lifecycle), feeding date-range aggregators for tokens, tool usage + autonomy ratio, activity (sessions/messages/active-nodes/stickiness), productivity (files/commits/PRs/LOC), and ecosystem breadth — all in `packages/core` and reusable by CLI/engine.
|
||||
- **Cost** — derived from token counts via a hand-maintained `model-pricing` map carrying `pricingAsOf` + a staleness flag; unknown models report unavailable rather than guessing.
|
||||
- **View** — a new lazy-loaded, ARIA-tabbed Command Center with hand-rolled CSS-bar chart primitives, a date-range picker, per-area panels, a live Mission-Control panel (SSE push + idle-aware polling), and an SDLC funnel.
|
||||
- **API** — `GET /api/command-center/{tokens,tools,activity,productivity,live}` (agent-usable), each under session auth and project scoping, with `?format=csv` export and an opt-in OpenTelemetry (OTLP) metrics exporter.
|
||||
10
.changeset/monitor-stage.md
Normal file
10
.changeset/monitor-stage.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
"@runfusion/fusion": minor
|
||||
---
|
||||
|
||||
Add the **Monitor stage** (U13) — deployment and incident tracking that closes the SDLC loop.
|
||||
|
||||
- **Schema** — new `deployments` and `incidents` SQLite tables (`packages/core/src/db.ts`, `SCHEMA_VERSION` 119 → 120, migration added in the same change; fingerprint auto-covers SCHEMA_SQL tables).
|
||||
- **Metrics** — real MTTR (incident-open → resolved) plus deploy/incident counts in `activity-analytics`, replacing the prior unavailable seam.
|
||||
- **Ingestion** — `POST /api/monitor/{deployments,incidents}` self-authenticate via a shared ingest secret (constant-time bearer check, fail-closed) with SSRF-untrusted payload links; `GET /api/monitor/metrics` exposes the aggregates.
|
||||
- **Loop closure** — a `monitor` workflow trait can auto-open a single fix task on a regression signal, guarded by `groupingKey` grouping, a threshold/sustained gate, cooldown absorption, a per-window circuit breaker, and a self-loop guard.
|
||||
@@ -138,7 +138,11 @@ describe("knowledge-index store", () => {
|
||||
db.exec("DROP INDEX IF EXISTS idxKnowledgePagesSourceKind");
|
||||
db.exec("DROP INDEX IF EXISTS idxKnowledgePagesUpdatedAt");
|
||||
db.exec("DROP TABLE IF EXISTS knowledge_pages");
|
||||
db.prepare("UPDATE __meta SET value = ? WHERE key = 'schemaVersion'").run(String(SCHEMA_VERSION - 1));
|
||||
// Pinned to the literal pre-migration version (118), NOT SCHEMA_VERSION-1:
|
||||
// knowledge_pages was created by migration 119, so seeding at 118 keeps this
|
||||
// test exercising that CREATE block even after later migrations land (mirrors
|
||||
// the literal-117 pin in usage-events.test.ts).
|
||||
db.prepare("UPDATE __meta SET value = ? WHERE key = 'schemaVersion'").run("118");
|
||||
|
||||
(db as unknown as { migrate: () => void }).migrate();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user