feat(metrics): publish timeseries.json + dashboard schema additions#863
Merged
sw-factory-automations merged 1 commit intomainfrom Apr 29, 2026
Merged
feat(metrics): publish timeseries.json + dashboard schema additions#863sw-factory-automations merged 1 commit intomainfrom
sw-factory-automations merged 1 commit intomainfrom
Conversation
Closes #862 - Daily snapshots gain five new fields: tests, issues.delta_done, issues.delta_opened, pr_merge_time_buckets, issue_close_time_buckets. - New aggregator (scripts/metrics/build-timeseries.mjs) publishes metrics/timeseries.json on every daily run. - Backfilled Apr 14-29 with measured values from GitHub API and git history (test counts from historical worktrees, issue/PR deltas from API, cumulative latency distributions from actual merge/close times). - Schema-guard validates top-level and per-day key sets before write. - Aggregator is idempotent (modulo updatedAt). - Updated daily-metrics automation to collect new fields and run aggregator as final step. Co-authored-by: Ona <no-reply@ona.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
|
✅ UI verification skipped — no UI files changed. Changed files are limited to |
Collaborator
|
✅ Post-merge verification passed. E2E suite against live site: 286/293 passed (8 did not run).
Ad-hoc smoke tests: All passed.
Interaction smoke test: N/A — this PR adds metrics data files and a build script consumed by an external site ( |
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
software-factory.dev's/dashboardroute is being migrated from a staticHTML file to a Next.js page that consumes a single time-series file from
this repository. The dashboard needs three pieces of data not currently
in
metrics/daily/*.json: test counts, daily issues-opened/closed deltas,and PR/issue latency distributions.
Closes #862
Change
tests,issues.delta_done,issues.delta_opened,pr_merge_time_buckets,issue_close_time_buckets.scripts/metrics/build-timeseries.mjs) publishesmetrics/timeseries.jsonon every daily run.(test counts from historical worktrees, issue/PR deltas from API,
cumulative latency distributions from actual merge/close times).
as final step.
The aggregator is idempotent: re-running it produces a byte-identical
file modulo
updatedAt. A schema-guard helper validates the top-leveland per-day key sets before write.
Sample diff (one daily snapshot)
{ "date": "2026-04-28", "day_number": 16, "loc": { "total": 64546, "delta": 1619, "by_language": { ... } }, "prs": { "total": 465, "delta": 0, "currently_open": 0 }, "commits": { "total": 488, "delta": 0 }, "test_coverage_pct": 38.35, "autonomous_pct": 85, - "issues": { "backlog": 0, "in_progress": 0, "in_review": 0, "done": 343 }, + "issues": { + "backlog": 0, "in_progress": 0, "in_review": 0, "done": 343, + "delta_done": 1, "delta_opened": 1 + }, + "tests": { "unit": 1591, "e2e": 290 }, + "pr_merge_time_buckets": { "lt_5m": 206, "5_10m": 177, "10_20m": 54, "30_60m": 24, "1_2h": 10 }, + "issue_close_time_buckets": { "lt_15m": 49, "15_30m": 81, "30_60m": 101, "1_2h": 66, "2_4h": 44, "4_8h": 16 }, "human_minutes": null, "agent_minutes": null }Validation
metrics/timeseries.jsonparses; top-level keys are exactly["updatedAt", "startDate", "days", "latest"].Consumer: https://github.com/gitpod-io/software-factory.dev