Skip to content

fix(scorecard): score first in-window DORA deploys using the prior production deployment - #4474

Open
PatAKnight wants to merge 1 commit into
redhat-developer:mainfrom
PatAKnight:dora-first-in-window
Open

fix(scorecard): score first in-window DORA deploys using the prior production deployment#4474
PatAKnight wants to merge 1 commit into
redhat-developer:mainfrom
PatAKnight:dora-first-in-window

Conversation

@PatAKnight

Copy link
Copy Markdown
Member

Hey, I just made a Pull Request!

First in-window DORA deploy wasn’t getting scored (lead time skipped PRs into it; CFR skipped the gap before it).

We now load the latest successful prod deploy before the 30-day window and use it as the pair/interval start. No prior deploy, same errors as today. DF/MTTR unchanged. Incident after the last in-window deploy still not counted.

GitHub collectors honor fetchItemsLimit (100) on that lookback so we don’t pull 1000 historical rows.

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

…oduction deployment

Signed-off-by: Patrick Knight <pknight@redhat.com>
@rhdh-gh-app

rhdh-gh-app Bot commented Aug 26, 2026

Copy link
Copy Markdown

Important

This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-scorecard-backend-module-dora workspaces/scorecard/plugins/scorecard-backend-module-dora minor v0.0.0
@red-hat-developer-hub/backstage-plugin-scorecard-backend-module-github workspaces/scorecard/plugins/scorecard-backend-module-github patch v4.2.0

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 26, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 1:02 PM UTC · Completed 1:17 PM UTC

Commit: 51f2aef · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $7.80

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.31250% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.61%. Comparing base (7ddd501) to head (51f2aef).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4474      +/-   ##
==========================================
+ Coverage   61.59%   61.61%   +0.01%     
==========================================
  Files        2565     2566       +1     
  Lines      102737   102789      +52     
  Branches    28822    28834      +12     
==========================================
+ Hits        63282    63331      +49     
- Misses      38843    38846       +3     
  Partials      612      612              
Flag Coverage Δ *Carryforward flag
adoption-insights 84.55% <ø> (ø) Carriedforward from 7ddd501
ai-integrations 67.70% <ø> (ø) Carriedforward from 7ddd501
app-defaults 48.37% <ø> (ø) Carriedforward from 7ddd501
augment 46.67% <ø> (ø) Carriedforward from 7ddd501
boost 79.84% <ø> (ø) Carriedforward from 7ddd501
bulk-import 72.79% <ø> (ø) Carriedforward from 7ddd501
cost-management 13.55% <ø> (ø) Carriedforward from 7ddd501
dcm 72.09% <ø> (ø) Carriedforward from 7ddd501
e2e-adoption-insights 60.00% <ø> (ø) Carriedforward from 7ddd501
e2e-extensions 62.13% <ø> (ø) Carriedforward from 7ddd501
e2e-global-header 49.45% <ø> (ø) Carriedforward from 7ddd501
e2e-homepage 61.11% <ø> (ø) Carriedforward from 7ddd501
e2e-intelligent-assistant 46.68% <ø> (ø) Carriedforward from 7ddd501
e2e-orchestrator 49.52% <ø> (ø) Carriedforward from 7ddd501
e2e-orchestrator-plugin 49.51% <ø> (ø) Carriedforward from 7ddd501
e2e-quickstart 55.21% <ø> (ø) Carriedforward from 7ddd501
e2e-scorecard 50.21% <ø> (ø) Carriedforward from 7ddd501
e2e-theme 16.36% <ø> (ø) Carriedforward from 7ddd501
extensions 56.59% <ø> (ø) Carriedforward from 7ddd501
global-floating-action-button 71.18% <ø> (ø) Carriedforward from 7ddd501
global-header 66.50% <ø> (ø) Carriedforward from 7ddd501
homepage 48.39% <ø> (ø) Carriedforward from 7ddd501
install-dynamic-plugins 58.57% <ø> (ø) Carriedforward from 7ddd501
intelligent-assistant 75.35% <ø> (ø) Carriedforward from 7ddd501
konflux 91.98% <ø> (ø) Carriedforward from 7ddd501
lightspeed 69.02% <ø> (ø) Carriedforward from 7ddd501
mcp-integrations 84.14% <ø> (ø) Carriedforward from 7ddd501
orchestrator 70.87% <ø> (ø) Carriedforward from 7ddd501
quickstart 63.74% <ø> (ø) Carriedforward from 7ddd501
sandbox 79.56% <ø> (ø) Carriedforward from 7ddd501
scorecard 87.48% <95.31%> (+0.06%) ⬆️
theme 88.91% <ø> (ø) Carriedforward from 7ddd501
translations 5.12% <ø> (ø) Carriedforward from 7ddd501
x2a 77.22% <ø> (ø) Carriedforward from 7ddd501

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ddd501...51f2aef. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Low

  • [import-ordering] workspaces/scorecard/plugins/scorecard-backend-module-github/src/collectors/schemas/deploymentSchemas.ts:18 — The import from ../../github/constants is placed before the z import from zod. The established convention across this codebase is to import external/third-party modules before internal/relative imports.
    Remediation: Move the import { DEFAULT_DEPLOYMENT_FETCH_ITEMS_LIMIT } line below the import { z } from 'zod' line.

  • [intent-mismatch] workspaces/scorecard/.changeset/dora-first-in-window-deploys.md — The PR title uses fix() prefix, but the changeset applies a minor semver bump to the dora package. The PR body describes a behavioral enhancement (predecessor lookback for first in-window deploys), which aligns with the minor bump but conflicts with the fix() prefix.
    Remediation: Consider feat() prefix or document why this is a fix.

*/

import { DEFAULT_DEPLOYMENT_FETCH_ITEMS_LIMIT } from '../../github/constants';
import { z } from 'zod';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] import-ordering

The import from '../../github/constants' is placed before the 'z' import from 'zod'. The established convention across this codebase is to import external/third-party modules before internal/relative imports.

Suggested fix: Move the import { DEFAULT_DEPLOYMENT_FETCH_ITEMS_LIMIT } line below the import { z } from 'zod' line.

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge All reviewers approved — ready to merge workspace/scorecard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant