Skip to content

Feat/release ingest - #369

Open
iron-prog wants to merge 13 commits into
hiero-hackers:mainfrom
iron-prog:feat/release-ingest
Open

Feat/release ingest#369
iron-prog wants to merge 13 commits into
hiero-hackers:mainfrom
iron-prog:feat/release-ingest

Conversation

@iron-prog

Copy link
Copy Markdown
Contributor

Description:

Add GitHub Releases analytics to track release cadence and repository staleness.

  • Add GitHub Releases GraphQL ingestion with caching and prerelease support.
  • Add release timeline and per-repository staleness analysis, including cadence-relative staleness_ratio.
  • Add release timeline and staleness visualizations.
  • Add a dedicated Releases dashboard with release-health KPIs and repository summary data.
  • Add tests for ingestion, analysis, pipeline, plotting, dashboard contracts, and KPI metrics.

Related issue(s):

Fixes #331

Notes for reviewer:

The implementation keeps release data independent from the governance/period-scoped repository overview and preserves repositories with no releases in the summary.

staleness_ratio compares the current release gap with each repository's historical median release gap, making staleness relative to its own cadence rather than raw days alone.

Validated against real hiero-ledger data. The pipeline successfully generated the release timeline/summary CSVs and both release charts.

  • 752 passed
  • 95.40% coverage

Checklist

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 775c999f-57fd-4802-9ee1-855e44d0ce9d

📥 Commits

Reviewing files that changed from the base of the PR and between 6b5eef3 and f7ef691.

📒 Files selected for processing (3)
  • src/hiero_analytics/dashboard_spec/releases.py
  • src/hiero_analytics/pipelines/releases.py
  • tests/contracts/test_output_contract.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/hiero_analytics/pipelines/releases.py
  • tests/contracts/test_output_contract.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

Changes

The change adds GitHub Releases ingestion, normalized release records, cadence and staleness analysis, a registered releases pipeline, period-specific charts, dashboard specifications, KPI metrics, web rendering, documentation, and tests.

Releases analytics

Layer / File(s) Summary
Release data contract and ingestion
src/hiero_analytics/data_sources/models.py, src/hiero_analytics/data_sources/queries/releases.graphql, src/hiero_analytics/data_sources/github_ingest/*, tests/data_sources/*
Adds ReleaseRecord, paginated GraphQL fetching, cache support, organization-level aggregation, draft filtering, prerelease handling, public exports, and ingestion tests.
Release analysis and pipeline outputs
src/hiero_analytics/analysis/releases.py, src/hiero_analytics/config/analysis.py, src/hiero_analytics/pipelines/*, src/hiero_analytics/plotting/scatter.py, tests/analysis/*, tests/pipelines/*, tests/plotting/*, tests/contracts/test_output_contract.py
Builds release timeline and staleness tables, classifies staleness buckets, writes CSV artifacts, generates period-specific charts, registers the pipeline, and validates edge cases.
Dashboard metrics and specification
src/hiero_analytics/dashboard_spec/*, src/hiero_analytics/export/macro_metrics.py, README.md
Adds release dashboard sections, timeline methodology, staleness glossary content, KPI annotations, macro metrics, and README command documentation.
Staleness column rendering
web/src/api.ts, web/src/app.css, web/src/components/FormattedCell.tsx, web/src/test/*
Adds the staleness column format and renders pace buckets as labeled severity chips with test coverage.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR implements most requirements from #331 but does not join staleness fields into the existing repo-summaries view. Add the required repo-summaries integration for latest_release and days_since_last_release, or document and obtain approval for the changed design.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title identifies release ingestion, which is a significant part of the release analytics changes.
Description check ✅ Passed The description clearly covers GitHub Releases ingestion, analysis, visualization, dashboard integration, and tests.
Out of Scope Changes check ✅ Passed The changes remain focused on GitHub Releases ingestion, analysis, visualization, dashboard integration, documentation, and related tests.
Docstring Coverage ✅ Passed Docstring coverage is 91.07% which is sufficient. The required threshold is 80.00%.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 05d93ac3-f36c-486b-a3fd-87018f5f746d

📥 Commits

Reviewing files that changed from the base of the PR and between 764924e and 00788e4.

📒 Files selected for processing (20)
  • README.md
  • src/hiero_analytics/analysis/releases.py
  • src/hiero_analytics/dashboard_spec/__init__.py
  • src/hiero_analytics/dashboard_spec/metrics.py
  • src/hiero_analytics/dashboard_spec/releases.py
  • src/hiero_analytics/data_sources/github_ingest/__init__.py
  • src/hiero_analytics/data_sources/github_ingest/releases.py
  • src/hiero_analytics/data_sources/models.py
  • src/hiero_analytics/data_sources/queries/releases.graphql
  • src/hiero_analytics/export/macro_metrics.py
  • src/hiero_analytics/pipelines/__init__.py
  • src/hiero_analytics/pipelines/releases.py
  • src/hiero_analytics/plotting/scatter.py
  • tests/analysis/test_releases.py
  • tests/contracts/test_output_contract.py
  • tests/data_sources/test_github_ingest.py
  • tests/data_sources/test_models.py
  • tests/export/test_macro_metrics.py
  • tests/pipelines/test_releases.py
  • tests/plotting/test_scatter.py

Comment thread src/hiero_analytics/analysis/releases.py
Comment thread src/hiero_analytics/data_sources/github_ingest/releases.py
@iron-prog

Copy link
Copy Markdown
Contributor Author

Status update: both CodeRabbit findings are addressed.

  • Pagination bound: fixed and resolved.
  • Never-released repos: staleness_ratio is now inf, while repos with only one release remain null. Tables/CSVs rank never-released repos first; the staleness chart excludes infinite values and documents this explicitly.

One note: the Linked Issues check flags the missing repo_activity_overview join. This is expected because the design was later redirected away from that approach during #331.

Ready for another review.

@iron-prog

Copy link
Copy Markdown
Contributor Author

@exploreriii any update on this

@exploreriii

Copy link
Copy Markdown
Contributor

Hi this is a complicated PR to review, please feel free to take on another issue while you wait :)
Thanks for understanding

@exploreriii exploreriii left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @iron-prog
I really like your approach

Just a couple extra requirements

Image

Could you please check using F12 on different screen sizes to see the chart renders as viewable as possible? ideally it would stretch to the viewport so it is not small
Further have you considered cahnging the x axis so it is more human friendly e.g. Nov with 2025 underneath or something?

Ideally we can make the release timeline dynamic - we have time filters in other charts and tables (1 month, 1 year, etc). can we use them so the reader can change what they want to see?
Please also check in dark mode, the colours render with enough contrast

I personally find the second bar chart overwhelming - Shipping repos most overdue relative to their own pace
I actually think it has similar data to the first that the user can 'absorb' visually anyway
So, does the second chart really present a different view, and if it does, in an easy to undesrtand way? I think mathematically it is nice, but for the use case it might not work well

table 3 covers that well too. maybe instead we can delete chart 2, keep table 3 and perhaps make the overdue vs. own pace column more visual? like for example something that is doing late releases can be a certain colour different to the avearge

Another idea is to consider groupign the repos by type - simialr to the network graphs : sdks, core, etc. That might help us gain some insight, but it might be overkill

What are your thoughts? i think its pretty good already! nice work

@exploreriii
exploreriii marked this pull request as draft August 14, 2026 20:48
@exploreriii

Copy link
Copy Markdown
Contributor

Also please do check hiero hackers will load correctly, and also that each of the new content has a widget url, as introduced by @MonaaEid recently

@iron-prog

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback! I agree with the suggestions. I’ll make the timeline responsive with better date formatting and dark-mode support, and I’ll also address chart problem and make the overdue-vs-own-pace column more visual in the table.

@iron-prog
iron-prog marked this pull request as ready for review August 19, 2026 14:14

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0705ec66-60e5-4558-84a0-f62c471fb49c

📥 Commits

Reviewing files that changed from the base of the PR and between d774964 and 6b5eef3.

📒 Files selected for processing (14)
  • src/hiero_analytics/analysis/releases.py
  • src/hiero_analytics/config/analysis.py
  • src/hiero_analytics/dashboard_spec/__init__.py
  • src/hiero_analytics/dashboard_spec/releases.py
  • src/hiero_analytics/pipelines/releases.py
  • src/hiero_analytics/plotting/scatter.py
  • tests/analysis/test_releases.py
  • tests/contracts/test_output_contract.py
  • tests/pipelines/test_releases.py
  • web/src/api.ts
  • web/src/app.css
  • web/src/components/FormattedCell.tsx
  • web/src/test/fixtures.ts
  • web/src/test/formattedCell.test.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

Comment thread src/hiero_analytics/pipelines/releases.py Outdated
@iron-prog
iron-prog requested a review from exploreriii August 19, 2026 17:28

@MonaaEid MonaaEid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! one question why isn’t there releases analytics for Hiero hackers?

Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
…iero-hackers#331)

Second layer on top of the ingest/analysis/pipeline commit.

- build_release_staleness now also computes median_gap_days and
  staleness_ratio (days_since_last_release / median_gap_days) -- how many
  multiples of a repo's own typical gap it's currently overdue by. Null
  for repos with <2 releases or a zero-day median gap (undefined, not
  coerced to 0/inf).
- Validated against real hiero-ledger data from issues/331: repos with an
  unremarkable raw days_since_last_release turned out to be the most
  overdue relative to their own pace (hiero-json-rpc-relay: 38 raw days,
  3-day norm, ratio 12.67x -- matches the maintainer's 'quiet repo that
  used to release every 3 weeks' scenario).
- plotting/scatter.py: plot_release_timeline -- dot/strip timeline,
  y-axis sorted by release count, per-repo count label instead of more
  dots (the overplotting fix from the prototype, now production code).
  Deliberately does not show zero-release repos (chart legibility;
  honest-denominator obligation lives in the staleness CSV instead).

Verified: 748 passed, 95.37% coverage, ruff clean.
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Third layer on top of the ingest/analysis/pipeline and staleness_ratio/
chart commits.

- dashboard_spec/releases.py: new standalone 'Releases' tab, registered
  in _FAMILIES. Standalone rather than a Governance sub-section, per the
  maintainer's redirect earlier in hiero-hackers#331 -- release staleness isn't
  governance-dependent or period-scoped.
- Two chart cards (release timeline, cadence-relative staleness bar)
  under one section group, plus the release_repo_summary.csv table
  section with the honest-denominator description carried into the UI copy.
- Glossary explains why release count isn't the headline metric and what
  the staleness ratio means, in plain language.

Verified: tests/dashboard_spec/ (strict spec-shape validator) 10/10
passed, ruff clean. Contract suite run deliberately shows one expected
failure (test_every_spec_chart_png_is_produced) -- the spec declares
release_timeline.png/release_staleness.png but the pipeline doesn't
generate them yet; that's the next commit.

Signed-off-by: iron-prog <dt915725@gmail.com>
Fourth and final layer -- closes out the feature end to end.

- pipelines/releases.py: generates release_timeline.png (windowed to
  ~18 months) and release_staleness.png (top 20 by staleness_ratio,
  repos with no established cadence correctly excluded rather than
  shown unranked). Both skip cleanly when there's nothing to plot.
- macro_metrics.py: releases_metrics -- 3 KPI tiles matching the design
  settled with the maintainer: 'repos with releases' (denominator,
  factual), 'released last 90d %' and '>3x their own typical gap'
  (both scoped to repos that have ever released, not the full repo
  universe -- most zero-release repos are docs/governance/meta, so an
  unscoped percentage would mostly measure org composition, not health).
- metrics.py: tile explainer text for all three, required by
  test_every_emitted_kpi_tile_explains_itself.
- test_output_contract.py: removed release_repo_summary.csv from the
  placeholder CHART_COMPANION_CSVS set now that it has a real section
  spec; release_timeline.csv stays (chart companion, no table).

Caught and fixed two issues before committing:
- A test comment claimed the staleness chart wouldn't be produced for a
  2-release repo; checked it against build_release_staleness directly
  and the comment was wrong (2 releases DO give one computable gap) --
  fixed the test to assert the chart exists instead of rationalizing
  its absence.
- The zero-repos-releasing branch of releases_metrics returned a bare
  0 instead of the 'X of Y' format the normal branch uses -- would have
  looked inconsistent on the actual tile across different org states.

Verified: 752 passed, 95.40% coverage, ruff clean, full contract suite
(8/8, hard-timeout-guarded) green including the two tests that were
failing until this commit (test_every_spec_chart_png_is_produced and
the KPI-explainer test).

Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
@iron-prog
iron-prog force-pushed the feat/release-ingest branch from f7ef691 to 39e7fb6 Compare August 22, 2026 01:53
@iron-prog

iron-prog commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Great work! one question why isn’t there releases analytics for Hiero hackers?

Thanks! This should be fixed now — the latest changes render Releases analytics for Hiero Hackers as well.

@github-actions

Copy link
Copy Markdown
Contributor

📊 Dashboard preview

The dashboard was built for this PR.

➡️ Download dashboard-preview-369, unzip, then serve it with python3 -m http.server -d . and open the URL it prints. (The app fetches its data over HTTP, so opening index.html directly shows an empty page.)

The artifact is built from this PR — treat it as contributor-authored code and glance at the diff before opening it. It expires after 7 days and is replaced on each new push.

@iron-prog
iron-prog requested a review from MonaaEid August 22, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ingest releases per repo: cadence chart and staleness columns

3 participants